Changeset 6231


Ignore:
Timestamp:
10/11/10 10:30:18 (14 years ago)
Author:
Eric.Larour
Message:

Took out partition and tpartition vectors, not needed anymore

Location:
issm/trunk/src
Files:
30 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/Container/Vertices.cpp

    r4221 r6231  
    4343
    4444/*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 in
    57          * 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 /*}}}*/
    7245/*FUNCTION Vertices::DistributeDofs{{{1*/
    7346void  Vertices::DistributeDofs(int numberofobjects,int numberofdofsperobject){
  • issm/trunk/src/c/Container/Vertices.h

    r4236 r6231  
    2626                /*}}}*/
    2727                /*numerics: {{{1*/
    28                 void  CreatePartitioningVector(Vec* ppartition,int numobjects);
    2928                void  DistributeDofs(int numberofnodes,int numdofspernode);
    3029                void  FlagClones(int numberofnodes);
  • issm/trunk/src/c/modules/AverageOntoPartitionx/AverageOntoPartitionx.cpp

    r5518 r6231  
    1919
    2020                       
    21 void AverageOntoPartitionx(double** paverage, Elements* elements, Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,double* vertex_response,Vec vertex_cluster_partition){
     21void AverageOntoPartitionx(double** paverage, Elements* elements, Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,double* vertex_response){
    2222
    2323        int     i,j,k;
     
    2525
    2626        int     qmu_npart;
    27         double *qmu_part_nocluster = NULL;
    2827        double *qmu_part  = NULL;
    29         double* partition=NULL; //serial version of vertex_cluster_partition
    3028        int     numberofvertices;
    3129
     
    3634        double* average=NULL;
    3735
    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");
    4138
    4239        /*Some parameters: */
     
    4441        parameters->FindParam(&qmu_npart,QmuNPartEnum);
    4542
    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. */
    5644
    5745        /*allocate: */
     
    8068
    8169        /*Free ressources:*/
    82         xfree((void**)&partition);
    83         xfree((void**)&qmu_part_nocluster);
    8470        xfree((void**)&qmu_part);
    8571        VecFree(&partition_contributions);
  • issm/trunk/src/c/modules/AverageOntoPartitionx/AverageOntoPartitionx.h

    r5518 r6231  
    99#include "../../Container/Container.h"
    1010
    11 void AverageOntoPartitionx(double** average, Elements* elements, Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,double* vertex_response,Vec vertex_cluster_partition);
     11void AverageOntoPartitionx(double** average, Elements* elements, Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,double* vertex_response);
    1212
    1313#endif  /* _AVERAGEONTOPARTITIONXX_H */
  • issm/trunk/src/c/modules/DakotaResponsesx/DakotaResponsesx.cpp

    r5518 r6231  
    1818
    1919
    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){
     20void DakotaResponsesx(double* d_responses,Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads,Materials* materials, Parameters* parameters,char** responses_descriptors,int numresponsedescriptors,int d_numresponses){
    2121
    2222        int        i,j,k;
     
    5454
    5555                        /*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);
    5757
    5858                        /*Copy onto our dakota responses: */
  • issm/trunk/src/c/modules/DakotaResponsesx/DakotaResponsesx.h

    r5518 r6231  
    99#include "../../Container/Container.h"
    1010
    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);
     11void DakotaResponsesx(double* d_responses,Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads,Materials* materials, Parameters* parameters,char** responses_descriptors,int numresponsedescriptors,int d_numresponses);
    1212
    1313#endif  /* _DAKOTARESPONSESXX_H */
  • issm/trunk/src/c/modules/InputUpdateFromDakotax/InputUpdateFromDakotax.cpp

    r5817 r6231  
    1010#include "../modules.h"
    1111
    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){
     12void  InputUpdateFromDakotax(Elements* elements,Nodes* nodes,Vertices* vertices,Loads* loads,Materials*  materials,Parameters* parameters,double* variables,char* *variables_descriptors,int numvariables){
    1313
    1414        int     i,j,k;
     
    1818        int     numberofvertices;
    1919        int     qmu_npart;
    20         double *qmu_part_serial = NULL;
    2120        double *qmu_part  = NULL;
    2221
    2322        double* distributed_values=NULL;
    2423        double* parameter=NULL;
    25         double* parameter_serial=NULL;
    2624        char*   descriptor=NULL;
    2725        char    root[50]; //root name of variable, ex: DragCoefficent, RhoIce, etc ...
    28         double* partition=NULL; //serial version of vec_partition
    2926
    3027        /*retrieve parameters: */
    3128        parameters->FindParam(&verbose,VerboseEnum);
    3229        parameters->FindParam(&qmu_npart,QmuNPartEnum);
    33         parameters->FindParam(&qmu_part_serial,&dummy,QmuPartEnum);
     30        parameters->FindParam(&qmu_part,&dummy,QmuPartEnum);
    3431        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];
    4232
    4333        /*Go through all dakota descriptors, ex: "rho_ice","thermal_conductivity","thickness1","thickness2", etc ..., and
     
    6252
    6353                        /*Now, pick up the parameter corresponding to root: */
    64                         if(!parameters->FindParam(&parameter_serial,NULL,StringToEnum(root))){
     54                        if(!parameters->FindParam(&parameter,NULL,StringToEnum(root))){
    6555                                ISSMERROR("%s%s"," could not find Qmu parameter: ",root);
    6656                        }
    6757
    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                        
    7258                        /*We've got the parameter, we need to update it using qmu_part (a partitioning vector), and the distributed_values: */
    7359                        for(k=0;k<numberofvertices;k++){
     
    9581                        /*Free allocations: */
    9682                        xfree((void**)&parameter);
    97                         xfree((void**)&parameter_serial);
    9883                        xfree((void**)&distributed_values);
    9984                }
     
    11196
    11297        /*Free ressources:*/
    113         xfree((void**)&partition);
    11498        xfree((void**)&qmu_part);
    115         xfree((void**)&qmu_part_serial);
    11699
    117100}
  • issm/trunk/src/c/modules/InputUpdateFromDakotax/InputUpdateFromDakotax.h

    r4454 r6231  
    99#include "../../Container/Container.h"
    1010
    11 void  InputUpdateFromDakotax(Elements* elements,Nodes* nodes,Vertices* vertices,Loads* loads,Materials*  materials,Parameters* parameters,Vec partition,double* variables,char* *variables_descriptors,int numvariables);
     11void  InputUpdateFromDakotax(Elements* elements,Nodes* nodes,Vertices* vertices,Loads* loads,Materials*  materials,Parameters* parameters,double* variables,char* *variables_descriptors,int numvariables);
    1212
    1313#endif  /* _INPUTUPDATEFROMDAKOTAXX_H */
  • issm/trunk/src/c/modules/Qmux/SpawnCoreParallel.cpp

    r5479 r6231  
    6565
    6666        /*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);
    6868
    6969        /*Determine solution sequence: */
     
    7777        /*compute responses: */
    7878        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);
    8080       
    8181        /*Free ressources:*/
  • issm/trunk/src/c/modules/VerticesDofx/VerticesDofx.cpp

    r4213 r6231  
    11/*!\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: */
    33 */
    44
     
    1010#include "../../EnumDefinitions/EnumDefinitions.h"
    1111
    12 void VerticesDofx( Vec* ppartition, Vec* ptpartition, Vertices* vertices, Parameters* parameters) {
     12void VerticesDofx( Vertices* vertices, Parameters* parameters) {
    1313
    1414        int i;
     
    2020        /*intermediary: */
    2121        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 vertices
    2822
    2923        /*figure out how many vertices we have: */
     
    3832        vertices->DistributeDofs(numberofvertices,1); //only 1 dof per vertex.
    3933
    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        
    5034}
  • issm/trunk/src/c/modules/VerticesDofx/VerticesDofx.h

    r4236 r6231  
    1010
    1111/* local prototypes: */
    12 void VerticesDofx( Vec* partition, Vec* ptpartition,Vertices* vertices, Parameters* parameters);
     12void VerticesDofx( Vertices* vertices, Parameters* parameters);
    1313
    1414#endif  /* _VERTICESDOFX_H */
  • issm/trunk/src/c/objects/Elements/Penta.cpp

    r6230 r6231  
    39613961}
    39623962/*}}}*/
     3963/*FUNCTION Penta::GetSidList{{{1*/
     3964void  Penta::GetSidList(int* sidlist){
     3965
     3966        int i;
     3967        for(i=0;i<NUMVERTICES;i++) doflist[i]=nodes[i]->GetSidList();
     3968
     3969}
     3970/*}}}*/
    39633971/*FUNCTION Penta::GetElementType {{{1*/
    39643972int Penta::GetElementType(){
  • issm/trunk/src/c/objects/Elements/Penta.h

    r6216 r6231  
    184184                void      GetDofList(int** pdoflist,int approximation_enum,int setenum);
    185185                void      GetDofList1(int* doflist);
     186                void      GetSidList(int* sidlist);
    186187                int     GetElementType(void);
    187188                void    GetParameterListOnVertices(double* pvalue,int enumtype);
  • issm/trunk/src/c/objects/Elements/Tria.cpp

    r6230 r6231  
    470470                        /*Get values on the 3 vertices*/
    471471                        for (i=0;i<3;i++){
    472                                 values[i]=vector[this->nodes[i]->GetVertexDof()];
     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!)
    473473                        }
    474474
     
    696696
    697697        /*Figure out the average for this element: */
    698         this->GetDofList1(&offset[0]);
     698        this->GetSidList(&offset[0]);
    699699        mean=0;
    700700        for(i=0;i<NUMVERTICES;i++){
     
    45614561}
    45624562/*}}}*/
     4563/*FUNCTION Tria::GetSidList {{{1*/
     4564void  Tria::GetSidList(int* sidlist){
     4565
     4566        int i;
     4567        for(i=0;i<NUMVERTICES;i++) doflist[i]=nodes[i]->GetSidList();
     4568
     4569}
     4570/*}}}*/
    45634571/*FUNCTION Tria::GetParameterListOnVertices(double* pvalue,int enumtype) {{{1*/
    45644572void Tria::GetParameterListOnVertices(double* pvalue,int enumtype){
  • issm/trunk/src/c/objects/Elements/Tria.h

    r6216 r6231  
    165165                void      GetDofList(int** pdoflist,int approximation_enum,int setenum);
    166166                void      GetDofList1(int* doflist);
     167                void      GetSidList(int* sidlist);
    167168                void    GetParameterListOnVertices(double* pvalue,int enumtype);
    168169                void    GetParameterListOnVertices(double* pvalue,int enumtype,double defaultvalue);
  • issm/trunk/src/c/objects/FemModel.cpp

    r6020 r6231  
    3232        this->analysis_counter=nummodels-1; //point to last analysis_type carried out.
    3333        this->results=new DataSet(); //not initialized by CreateDataSets
    34         this->partition=NULL;
    35         this->tpartition=NULL;
    3634       
    3735        /*Dynamically allocate whatever is a list of length nummodels: */
     
    5553                this->SetCurrentConfiguration(analysis_type);
    5654       
    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                }
    5959
    6060                _printf_("      resolve node constraints\n");
     
    9191        delete parameters;
    9292        delete results;
    93         VecFree(&partition);
    94         VecFree(&tpartition);
    9593
    9694        for(i=0;i<nummodels;i++){
  • issm/trunk/src/c/objects/FemModel.h

    r5772 r6231  
    3636                DataSet*            results; //results that cannot be fit into the elements (such as one time constants, arrays, strings, etc ...)
    3737
    38                 Vec                 partition; //one partitioning for all elements
    39                 Vec                 tpartition;
    40                
    4138                //multiple  sets of matrices/vectors for each analysis_type. m stands for multiple
    4239                NodeSets**           m_nodesets; //boundary conditions dof sets
  • issm/trunk/src/c/objects/Materials/Matice.cpp

    r6216 r6231  
    626626                                case TriaEnum:
    627627                                        double values[3];
    628                                         for (int i=0;i<3;i++) values[i]=vector[((Tria*)element)->nodes[i]->GetVertexDof()];
     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
    629629                                        this->inputs->AddInput(new TriaVertexInput(name,values));
    630630                                        return;
  • issm/trunk/src/c/objects/Node.cpp

    r6141 r6231  
    395395}
    396396/*}}}*/
     397/*FUNCTION Node::GetSidList{{{1*/
     398int  Node::GetSidList(void){
     399
     400        Vertex* vertex=NULL;
     401
     402        vertex=(Vertex*)this->hvertex->delivers();
     403
     404        return vertex->sid;
     405}
     406/*}}}*/
    397407/*FUNCTION Node::GetLocalDofList{{{1*/
    398408void  Node::GetLocalDofList(int* outdoflist,int approximation_enum,int setenum){
     
    946956}
    947957/*}}}*/
    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  
    8484                void  GetLocalDofList(int* poutdoflist,int approximation_enum,int setenum);
    8585                int   GetDofList1(void);
     86                int   GetSidList(void);
    8687                double GetX();
    8788                double GetY();
     
    100101                void  UpdateCloneDofs(int* alltruerows,int ncols,int setenum);
    101102                void  SetClone(int* minranks);
    102                 void  CreatePartition(Vec partition);
    103103                /*}}}*/
    104104};
  • issm/trunk/src/c/objects/Vertex.cpp

    r5016 r6231  
    255255}
    256256/*}}}*/
    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 /*}}}*/
    270257
    271258/*Vertex management: */
  • issm/trunk/src/c/objects/Vertex.h

    r4492 r6231  
    5656                void  UpdateCloneDofs(int* allborderdofs);
    5757                void  SetClone(int* minranks);
    58                 void  CreatePartition(Vec partition);
    5958                /*}}}*/
    6059                /*Vertex management: {{{1*/
  • issm/trunk/src/m/solutions/NewFemModel.m

    r5776 r6231  
    3131                femmodel=SetCurrentConfiguration(femmodel,analysis_type);
    3232
    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);
    3636                end
    3737
  • issm/trunk/src/m/solutions/SpawnCore.m

    r5488 r6231  
    1515
    1616%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);
    1818
    1919%now run the core solution
     
    2323
    2424%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);
     25responses=DakotaResponses(femmodel.elements,femmodel.nodes,femmodel.vertices,femmodel.loads,femmodel.materials,femmodel.parameters,responsedescriptors);
  • issm/trunk/src/mex/DakotaResponses/DakotaResponses.cpp

    r5528 r6231  
    1616        Materials*  materials=NULL;
    1717        Parameters* parameters=NULL;
    18         Vec         node_partition=NULL;
    1918        double*     responses=NULL;
    2019        char**      responses_descriptors=NULL;
     
    3837        FetchData((DataSet**)&materials,MATERIALSIN);
    3938        FetchParams(&parameters,PARAMETERSIN);
    40         FetchData(&node_partition,NODEPARTITION);
    41 
    42         /*shit partition by 1 (matlab to c indexing): */
    43         VecShift(node_partition,-1.0);
    4439
    4540        /*number of responses: */
     
    6661       
    6762        /*!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);
    6964
    7065        /*write output datasets: */
  • issm/trunk/src/mex/DakotaResponses/DakotaResponses.h

    r5482 r6231  
    2424#define MATERIALSIN (mxArray*)prhs[4]
    2525#define PARAMETERSIN (mxArray*)prhs[5]
    26 #define NODEPARTITION (mxArray*)prhs[6]
    27 #define RESPONSESDESCRIPTORS (mxArray*)prhs[7]
     26#define RESPONSESDESCRIPTORS (mxArray*)prhs[6]
    2827
    2928/* serial output macros: */
     
    3433#define NLHS  1
    3534#undef NRHS
    36 #define NRHS  8
     35#define NRHS  7
    3736
    3837#endif  /* _DAKOTARESPONSES_H */
  • issm/trunk/src/mex/InputUpdateFromDakota/InputUpdateFromDakota.cpp

    r5326 r6231  
    2222        int         numvariables;
    2323        mxArray*    pfield=NULL;
    24         Vec         partition=NULL;
    2524
    2625        /*Boot module: */
     
    3736        FetchData((DataSet**)&materials,MATERIALSIN);
    3837        FetchParams(&parameters,PARAMETERSIN);
    39         FetchData(&partition,PARTITION);
    40         VecShift(partition,-1.0); //get partition onto "c" indexing
    4138        /*dakota input: */
    4239        FetchData(&variables,&numvariables,VARIABLES);
     
    6057
    6158        /*!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);
    6360
    6461        /*write output datasets: */
     
    7471        delete materials;
    7572        delete parameters;
    76         VecFree(&partition);
    7773
    7874        xfree((void**)&variables);
  • issm/trunk/src/mex/InputUpdateFromDakota/InputUpdateFromDakota.h

    r4532 r6231  
    2424#define MATERIALSIN (mxArray*)prhs[4]
    2525#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]
    2928
    3029/* serial output macros: */
     
    3736#define NLHS  3
    3837#undef NRHS
    39 #define NRHS  9
     38#define NRHS  8
    4039
    4140#endif  /* _UPDATEINPUTSFROMDAKOTA_H */
  • issm/trunk/src/mex/VerticesDof/VerticesDof.cpp

    r4453 r6231  
    1111        Parameters* parameters=NULL;
    1212
    13         /* output datasets: */
    14         Vec partition=NULL;
    15         Vec tpartition=NULL;
    16 
    1713        /*Boot module: */
    1814        MODULEBOOT();
     
    2622
    2723        /*!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);
    3325
    3426        /*write output datasets: */
    3527        WriteData(VERTICES,vertices);
    36         WriteData(PARTITION,partition);
    37         WriteData(TPARTITION,tpartition);
    3828
    3929        /*Free ressources: */
    4030        delete vertices;
    4131        delete parameters;
    42         VecFree(&partition);
    43         VecFree(&tpartition);
    4432
    4533        /*end module: */
     
    5038{
    5139        _printf_("\n");
    52         _printf_("   usage: [vertices,part,tpart] = %s(vertices,parameters);\n",__FUNCT__);
     40        _printf_("   usage: [vertices] = %s(vertices,parameters);\n",__FUNCT__);
    5341        _printf_("\n");
    5442}
  • issm/trunk/src/mex/VerticesDof/VerticesDof.h

    r4236 r6231  
    2222/* serial output macros: */
    2323#define VERTICES (mxArray**)&plhs[0]
    24 #define PARTITION (mxArray**)&plhs[1]
    25 #define TPARTITION (mxArray**)&plhs[2]
    2624
    2725/* serial arg counts: */
    2826#undef NLHS
    29 #define NLHS  3
     27#define NLHS  1
    3028#undef NRHS
    3129#define NRHS  2
Note: See TracChangeset for help on using the changeset viewer.