Changeset 13413


Ignore:
Timestamp:
09/20/12 17:40:12 (12 years ago)
Author:
Mathieu Morlighem
Message:

CHG: cosmetics

Location:
issm/trunk-jpl/src/c
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/Container/Nodes.cpp

    r12459 r13413  
    160160        ranks=xNew<int>(numnodes);
    161161        minranks=xNew<int>(numnodes);
    162 
    163162        for(i=0;i<numnodes;i++)ranks[i]=num_procs; //no cpu can have rank num_procs. This is the maximum limit.
    164163
     
    171170         * order of cpu rank. This is also why we initialized this array to num_procs.*/
    172171        #ifdef _HAVE_MPI_
    173         MPI_Allreduce ( (void*)ranks,(void*)minranks,numnodes,MPI_INT,MPI_MIN,MPI_COMM_WORLD);
     172        MPI_Allreduce((void*)ranks,(void*)minranks,numnodes,MPI_INT,MPI_MIN,MPI_COMM_WORLD);
    174173        #else
    175174        for(i=0;i<numnodes;i++)minranks[i]=ranks[i];
     
    329328void   Nodes::Ranks(int* ranks,int analysis_type){
    330329
     330        extern int my_rank;
     331        int        sid;
     332
    331333        /*Go through nodes, and for each object, report it cpu: */
    332 
    333         int i;
    334         int rank;
    335         int sid;
    336        
    337         for(i=0;i<this->Size();i++){
    338 
    339                 Node* node=(Node*)this->GetObjectByOffset(i);
    340 
    341                 /*Check that this node corresponds to our analysis currently being carried out: */
    342                 if (node->InAnalysis(analysis_type)){
    343 
    344                         rank=node->MyRank();
     334        for(int i=0;i<this->Size();i++){
     335
     336                Node* node=(Node*)this->GetObjectByOffset(i);
     337
     338                /*Check that this node corresponds to our analysis currently being carried out: */
     339                if (node->InAnalysis(analysis_type)){
     340                        /*Plug rank into ranks, according to sid: */
    345341                        sid=node->Sid();
    346 
    347                         /*Plug rank into ranks, according to id: */
    348                         ranks[sid]=rank;
    349                 }
    350         }
    351         return;
     342                        ranks[sid]=my_rank;
     343                }
     344        }
    352345}
    353346/*}}}*/
  • issm/trunk-jpl/src/c/Container/Vertices.cpp

    r13410 r13413  
    177177void   Vertices::Ranks(int* ranks){
    178178
     179        extern int my_rank;
     180        int        sid;
     181
    179182        /*Go through a dataset, and for each object, report it cpu: */
    180 
    181         int i;
    182         int rank;
    183         int sid;
    184        
    185         for(i=0;i<this->Size();i++){
     183        for(int i=0;i<this->Size();i++){
     184                /*Plug rank into ranks, according to id: */
    186185                Vertex* vertex=(Vertex*)this->GetObjectByOffset(i);
    187                 rank=vertex->MyRank();
    188186                sid=vertex->Sid();
    189                
    190                 /*Plug rank into ranks, according to id: */
    191                 ranks[sid]=rank;
     187                ranks[sid]=my_rank;
    192188        }
    193         return;
    194189}
    195190/*}}}*/
  • issm/trunk-jpl/src/c/classes/DofIndexing.cpp

    r13412 r13413  
    204204}               
    205205/*}}}*/
    206 
  • issm/trunk-jpl/src/c/classes/DofIndexing.h

    r13412 r13413  
    1313
    1414                /*sizes: */
    15                 int gsize; //number of dofs for a node
    16                 int fsize; //number of dofs solver for
    17                 int ssize; //number of constrained dofs
     15                int gsize;   //number of dofs for a node
     16                int fsize;   //number of dofs solver for
     17                int ssize;   //number of constrained dofs
    1818
    1919                /*partitioning: */
    20                 bool clone;   //this node is replicated from another one 
     20                bool clone;   //this node is replicated from another one
    2121
    2222                /*boundary conditions sets: */
    23                 bool*     f_set; //is dof on f-set (on which we solve)
    24                 bool*     s_set; //is dof on s-set (on which boundary conditions -dirichlet- are applied)
    25                 IssmDouble*   svalues; //list of constraint values. size g_size, for ease of use.
     23                bool       *f_set;    //is dof on f-set (on which we solve)
     24                bool       *s_set;    //is dof on s-set (on which boundary conditions -dirichlet- are applied)
     25                IssmDouble *svalues;  //list of constraint values. size g_size, for ease of use.
    2626
    2727                /*types of dofs: */
    28                 int*     doftype; //approximation type of the dofs (used only for coupling), size g_size
     28                int        *doftype;  //approximation type of the dofs (used only for coupling), size g_size
    2929               
    3030                /*list of degrees of freedom: */
    31                 int*     gdoflist; //dof list in g_set
    32                 int*     fdoflist; //dof list in f_set
    33                 int*     sdoflist; //dof list in s_set
    34 
     31                int *gdoflist;   //dof list in g_set
     32                int *fdoflist;   //dof list in f_set
     33                int *sdoflist;   //dof list in s_set
    3534
    3635                /*DofIndexing constructors, destructors {{{*/
  • issm/trunk-jpl/src/c/classes/FemModel.cpp

    r13277 r13413  
    22 * \brief: implementation of the FemModel object
    33 */
    4 
    54
    65#ifdef HAVE_CONFIG_H
     
    3332
    3433        /*Initialize internal data: */
    35         this->nummodels=nummodels;
    36         this->solution_type=in_solution_type;
    37         this->analysis_counter=nummodels-1; //point to last analysis_type carried out.
    38         this->results=new Results(); //not initialized by CreateDataSets
     34        this->nummodels        = nummodels;
     35        this->solution_type    = in_solution_type;
     36        this->analysis_counter = nummodels-1;  //point to last analysis_type carried out.
     37        this->results          = new Results(); //not initialized by CreateDataSets
    3938       
    4039        /*Dynamically allocate whatever is a list of length nummodels: */
     
    7473        /*Add output file name to parameters: */
    7574        this->parameters->AddObject(new StringParam(OutputfilenameEnum,outputfilename));
    76 
    7775}
    78 
    7976/*}}}*/
    8077/*FUNCTION FemModel::destructor {{{*/
     
    153150/*FUNCTION FemModel::SetCurrentConfiguration(int configuration_type){{{*/
    154151void FemModel::SetCurrentConfiguration(int configuration_type){
    155 
    156         /*overload: analysis_type = configuration_type: */
    157152        this->SetCurrentConfiguration(configuration_type,configuration_type);
    158153}
  • issm/trunk-jpl/src/c/classes/FemModel.h

    r13277 r13413  
    2828        public:
    2929
    30                 int                 nummodels;
    31                 int                 solution_type;
    32                 int*                analysis_type_list; //list of analyses this femmodel is going to carry out
    33                 int                 analysis_counter; //counter into analysis_type_list
    34                
    35                 Elements*           elements; //elements (one set for all analyses)
    36                 Nodes*              nodes; //one set of nodes
    37                 Vertices*           vertices; //one set of vertices
    38                 Constraints*        constraints; //one set of constraints. each constraint knows which analysis_type it handles
    39                 Loads*              loads;  //one set of constraints. each constraint knows which analysis_type it handles
    40                 Materials*          materials;  //one set of materials, for each element
    41                 Parameters*         parameters; //one set of parameters, independent of the analysis_type
    42                 Results*            results; //results that cannot be fit into the elements (such as one time constants, arrays, strings, etc ...)
     30                int          nummodels;
     31                int          solution_type;
     32                int         *analysis_type_list;  //list of analyses this femmodel is going to carry out
     33                int          analysis_counter;    //counter into analysis_type_list
     34
     35                Elements    *elements;            //elements (one set for all analyses)
     36                Nodes       *nodes;                //one set of nodes
     37                Vertices    *vertices;            //one set of vertices
     38                Constraints *constraints;          //one set of constraints. each constraint knows which analysis_type it handles
     39                Loads       *loads;                //one set of constraints. each constraint knows which analysis_type it handles
     40                Materials   *materials;            //one set of materials, for each element
     41                Parameters  *parameters;          //one set of parameters, independent of the analysis_type
     42                Results     *results;              //results that cannot be fit into the elements
    4343
    4444                /*constructors, destructors: */
  • issm/trunk-jpl/src/c/classes/Hook.cpp

    r13056 r13413  
    22 * \brief: implementation of the Hook object: see Hook.h for more explanations.
    33 */
    4 
    54
    65#ifdef HAVE_CONFIG_H
     
    1817#include "../include/include.h"
    1918
    20 
    2119/*Constructor/Destructors*/
    2220/*FUNCTION Hook::Hook(){{{*/
    2321Hook::Hook(){
    24         this->num=0;
    25         this->objects=NULL;
    26         this->ids=NULL;
    27         this->offsets=NULL;
    28         return;
     22        this->num     = 0;
     23        this->objects = NULL;
     24        this->ids     = NULL;
     25        this->offsets = NULL;
    2926}
    3027/*}}}*/
    3128/*FUNCTION Hook::Hook(int* ids, int num){{{*/
    3229Hook::Hook(int* in_ids, int in_num){
    33 
    34         /*Intermediaries*/
    35         int i;
    3630
    3731        /*Get number of objects to hook*/
     
    4135        if (num==0){
    4236                /*Empty hook*/
    43                 this->ids=NULL;
    44                 this->objects=NULL;
    45                 this->offsets=NULL;
     37                this->ids     = NULL;
     38                this->objects = NULL;
     39                this->offsets = NULL;
    4640        }
    4741        else{
     
    5246
    5347                /*Copy ids: */
    54                 for (i=0;i<this->num;i++){
    55                         this->ids[i]=in_ids[i];
    56                         this->objects[i]=NULL;
    57                         this->offsets[i]=0;
     48                for(int i=0;i<this->num;i++){
     49                        this->ids[i]     = in_ids[i];
     50                        this->objects[i] = NULL;
     51                        this->offsets[i] = 0;
    5852                }
    5953        }
     
    6256/*FUNCTION Hook::~Hook(){{{*/
    6357Hook::~Hook(){
    64         /*deallocate: */
    6558        xDelete<Object*>(this->objects);
    6659        xDelete<int>(this->ids);
    6760        xDelete<int>(this->offsets);
    68         return;
    6961}
    7062/*}}}*/
     
    121113Object* Hook::copy(void){
    122114
    123         int i;
    124 
    125115        /*output: */
    126116        Hook* output=NULL;
     
    132122        output->num=this->num;
    133123        if(output->num){
    134                 output->objects=xNew<Object*>(output->num);
    135                 output->ids=xNew<int>(output->num);
    136                 output->offsets=xNew<int>(output->num);
     124                output->objects = xNew<Object*>(output->num);
     125                output->ids     = xNew<int>(output->num);
     126                output->offsets = xNew<int>(output->num);
    137127        }
    138128       
    139         for(i=0;i<output->num;i++){
    140                 output->objects[i]=this->objects[i];
    141                 output->offsets[i]=this->offsets[i];
    142                 output->ids[i]=this->ids[i];
     129        for(int i=0;i<output->num;i++){
     130                output->objects[i] = this->objects[i];
     131                output->offsets[i] = this->offsets[i];
     132                output->ids[i]     = this->ids[i];
    143133        }
    144134
     
    231221Hook* Hook::Spawn(int* indices, int numindices){
    232222
    233         int i;
    234 
    235223        /*output: */
    236224        Hook* output=NULL;
     
    246234
    247235        /*Else, check that we are requesting a half of num*/
    248         if (numindices>this->num) _error_("Cannot spawn hook with " << numindices << " objects from a Hook of " << this->num << " objects");
     236        if(numindices>this->num) _error_("Cannot spawn hook with " << numindices << " objects from a Hook of " << this->num << " objects");
    249237
    250238        /*go pickup the correct objects, ids and offsets :*/
     
    252240        if(output->num<1) _error_("Trying to spawn an empty ElementProperties!");
    253241
    254         output->objects=xNew<Object*>(output->num);
    255         output->ids=xNew<int>(output->num);
    256         output->offsets=xNew<int>(output->num);
    257 
    258         for(i=0;i<output->num;i++){
    259                 output->objects[i]=this->objects[indices[i]];
    260                 output->ids[i]=this->ids[indices[i]];
    261                 output->offsets[i]=this->offsets[indices[i]];
     242        output->objects = xNew<Object*>(output->num);
     243        output->ids     = xNew<int>(output->num);
     244        output->offsets = xNew<int>(output->num);
     245
     246        for(int i=0;i<output->num;i++){
     247                output->objects[i] = this->objects[indices[i]];
     248                output->ids[i]     = this->ids[indices[i]];
     249                output->offsets[i] = this->offsets[indices[i]];
    262250        }
    263251
  • issm/trunk-jpl/src/c/classes/Hook.h

    r12832 r13413  
    1919        private:
    2020
    21                 int        num; //number of objects being hooked onto
    22                 Object**           objects; //list of object pointers. we do not allocate objects, just a list a pointers, that will get to point to the real objects from a dataset.
    23                 int*   ids;     //list of object ids, to go look for them in datasets.
    24                 int*   offsets;  //list of object offsets into datasets, to speed up lookup.
     21                int      num;      //number of objects being hooked onto
     22                Object **objects;   //list of object pointers
     23                int     *ids;       //list of object ids, to go look for them in datasets.
     24                int     *offsets;   //list of object offsets into datasets, to speed up lookup.
    2525
    2626        public:
  • issm/trunk-jpl/src/c/classes/IoModel.cpp

    r13412 r13413  
    2424/*FUNCTION IoModel::IoModel(){{{*/
    2525IoModel::IoModel(){
    26         this->fid=NULL;
    27         this->data=NULL;
    28         this->independents=NULL;
    29         this->constants=NULL;
    30        
    31         this->my_elements=NULL;
    32         this->my_nodes=NULL;
    33         this->my_vertices=NULL;
    34         this->singlenodetoelementconnectivity=NULL;
    35         this->numbernodetoelementconnectivity=NULL;
    36        
    37         this->nodecounter=0;
    38         this->loadcounter=0;
    39         this->constraintcounter=0;
     26        this->fid          = NULL;
     27        this->data         = NULL;
     28        this->independents = NULL;
     29        this->constants    = NULL;
     30       
     31        this->my_elements                     = NULL;
     32        this->my_nodes                        = NULL;
     33        this->my_vertices                     = NULL;
     34        this->singlenodetoelementconnectivity = NULL;
     35        this->numbernodetoelementconnectivity = NULL;
     36       
     37        this->nodecounter       = 0;
     38        this->loadcounter       = 0;
     39        this->constraintcounter = 0;
    4040}
    4141/*}}}*/
     
    6262       
    6363        /*Initialize permanent data: */
    64         this->my_elements=NULL;
    65         this->my_nodes=NULL;
    66         this->my_vertices=NULL;
    67         this->singlenodetoelementconnectivity=NULL;
    68         this->numbernodetoelementconnectivity=NULL;
    69        
    70         this->nodecounter=0;
    71         this->loadcounter=0;
    72         this->constraintcounter=0;
     64        this->my_elements                     = NULL;
     65        this->my_nodes                        = NULL;
     66        this->my_vertices                     = NULL;
     67        this->singlenodetoelementconnectivity = NULL;
     68        this->numbernodetoelementconnectivity = NULL;
     69       
     70        this->nodecounter       = 0;
     71        this->loadcounter       = 0;
     72        this->constraintcounter = 0;
    7373}
    7474/*}}}*/
     
    200200void  IoModel::DeleteData(int num,...){
    201201
    202         va_list ap;
    203         int     dataenum;
    204         int     i;
    205         DoubleMatParam* parameter=NULL;
     202        va_list         ap;
     203        int             dataenum;
     204        DoubleMatParam *parameter = NULL;
    206205
    207206        /*Go through the entire list of enums and delete the corresponding data from the iomodel-data dataset: */
    208 
    209207        va_start(ap,num);
    210         for(i = 0; i <num; i++){
     208        for(int i=0; i<num; i++){
    211209                dataenum=va_arg(ap, int);
    212210                _assert_(dataenum<MaximumNumberOfEnums);
     
    217215        va_end(ap);
    218216} /*}}}*/
    219 /*FUNCTION IoModel::DeleteData(IssmDouble* {{{*/
     217/*FUNCTION IoModel::DeleteData(IssmDouble* vector, int dataenum) {{{*/
    220218void  IoModel::DeleteData(IssmDouble* vector, int dataenum){
    221219
     
    475473        #endif
    476474
    477         /*cast to bool: */
    478475        /*Assign output pointers: */
    479476        *pboolean=(bool)booleanint;
     
    514511
    515512        /*output: */
    516         IssmPDouble   scalar;
    517         int      code;
     513        IssmPDouble scalar;
     514        int         code;
    518515
    519516        /*Set file pointer to beginning of the data: */
     
    550547        if(code!=4)_error_("expecting a string for enum " << EnumToStringx(data_enum));
    551548       
    552         /*Now fetch: */
    553        
    554549        /*We have to read a string from disk. First read the dimensions of the string, then the string: */
    555550        if(my_rank==0){ 
     
    578573                string[0]='\0';
    579574        }
    580 
    581575
    582576        /*Assign output pointers: */
     
    603597        if((code!=5) && (code!=6) && (code!=7))_error_("expecting a IssmDouble, integer or boolean matrix for enum " << EnumToStringx(data_enum));
    604598       
    605         /*Now fetch: */
    606 
    607599        /*We have to read a matrix from disk. First read the dimensions of the matrix, then the whole matrix: */
    608600        /*numberofelements: */
     
    673665        if((code!=5) && (code!=6) && (code!=7))_error_("expecting a IssmDouble, integer or boolean matrix for enum " << EnumToStringx(data_enum));
    674666       
    675         /*Now fetch: */
    676 
    677667        /*We have to read a matrix from disk. First read the dimensions of the matrix, then the whole matrix: */
    678668        /*numberofelements: */
     
    794784
    795785        int i;
    796 
    797786        extern int my_rank;
    798787
    799788        /*output: */
    800         IssmDouble** matrices=NULL;
    801         int*     mdims=NULL;
    802         int*     ndims=NULL;
    803         int      numrecords=0;
     789        IssmDouble **matrices   = NULL;
     790        int         *mdims      = NULL;
     791        int         *ndims      = NULL;
     792        int          numrecords = 0;
    804793
    805794        /*intermediary: */
     
    930919void  IoModel::FetchData(int num,...){
    931920
    932         va_list ap;
    933         int     dataenum;
    934         IssmDouble* matrix=NULL;
    935         int     M,N;
    936         int     i;
    937 
    938         /*Go through the entire list of enums and fetch the corresponding data. Add it to the iomodel->data dataset. Everything
    939          *we fetch is a IssmDouble* : */
     921        va_list     ap;
     922        int         dataenum;
     923        IssmDouble *matrix   = NULL;
     924        int         M,N;
     925
     926        /*Go through the entire list of enums and fetch the corresponding data.
     927         * Add it to the iomodel->data dataset. Everything
     928         * we fetch is a IssmDouble* : */
    940929       
    941930        va_start(ap,num);
    942         for(i=0; i<num; i++){
     931        for(int i=0; i<num; i++){
    943932               
    944933                dataenum=va_arg(ap, int);
     
    964953        }
    965954        va_end(ap);
    966 
    967955}
    968956/*}}}*/
     
    982970        int     nel;
    983971        int     numberofelements;
    984 
    985972
    986973        /*variables being fetched: */
     
    13091296        if((code!=5) && (code!=6) && (code!=7))_error_("expecting a IssmDouble, integer or boolean matrix for enum " << EnumToStringx(independent_enum));
    13101297       
    1311         /*Now fetch: */
    1312 
    13131298        /*We have to read a matrix from disk. First read the dimensions of the matrix, then the whole matrix: */
    13141299        /*numberofelements: */
  • issm/trunk-jpl/src/c/classes/IoModel.h

    r13290 r13413  
    1919
    2020        private:
    21                 Parameters  *constants;   //this dataset holds all IssmDouble, int, bool and char *parameters read in from the input file.*
     21                Parameters *constants;   //this dataset holds all IssmDouble, int, bool and char from input
    2222       
    2323        public:
    24                 IssmDouble **data;        //this dataset holds temporary data, memory intensive.
     24                IssmDouble **data;   //this dataset holds temporary data, memory intensive.
    2525               
    2626                /*This data needs to stay memory resident at all time, even if it's memory intensive: */
    27                 FILE *fid;         //pointer to input file
     27                FILE *fid;                               //pointer to input file
    2828                bool *my_elements;
    2929                bool *my_nodes;
  • issm/trunk-jpl/src/c/classes/Patch.cpp

    r12832 r13413  
    33 */
    44
    5 /*Include files: {{{*/
     5/*Include files */
    66#ifdef HAVE_CONFIG_H
    77        #include <config.h>
     
    1919#include "../shared/shared.h"
    2020#include "../include/include.h"
    21 /*}}}*/
    2221
    2322/*Object constructors and destructors:*/
    2423/*FUNCTION Patch::Patch() default constructor {{{*/
    2524Patch::Patch(){
    26         this->numrows=0;
    27         this->numcols=0;
    28         this->maxvertices=0;
    29         this->maxnodes=0;
    30         this->values=NULL;
     25        this->numrows     = 0;
     26        this->numcols     = 0;
     27        this->maxvertices = 0;
     28        this->maxnodes    = 0;
     29        this->values      = NULL;
    3130}
    3231/*}}}*/
     
    3433Patch::Patch(int in_numrows, int in_maxvertices, int in_maxnodes){
    3534
    36         int i,j;
    3735        this->numrows=in_numrows;
    3836        this->maxvertices=in_maxvertices;
    3937        this->maxnodes=in_maxnodes;
    40    
    4138        this->numcols=1  //enum_type
    4239                +1           //step
     
    5249        }
    5350        else{
    54                 this->values=xNew<IssmDouble>(this->numcols*this->numrows);
    55                 for(i=0;i<this->numrows;i++){
    56                         for(j=0;j<this->numcols;j++){
     51                this->values=xNew<IssmDouble>(this->numcols*this->numrows);
     52                for(int i=0;i<this->numrows;i++){
     53                        for(int j=0;j<this->numcols;j++){
    5754                                this->values[i*this->numcols+j]=NAN;
    5855                        }
     
    9895
    9996        /*Let's remember what is on a row:
    100          enum_type step time element_id interpolation vertices_ids nodal_values
    101          */
     97         enum_type step time element_id interpolation vertices_ids nodal_values */
    10298        row[0]=enum_type;
    10399        row[1]=(IssmDouble)step;
  • issm/trunk-jpl/src/c/classes/Patch.h

    r12821 r13413  
    2020*/
    2121
    22 
    2322#ifndef _PATCH_H_
    2423#define  _PATCH_H_
     
    2928        public:
    3029
    31                 int     numrows; //number of results held in Patch object
    32                 int     numcols; //number of columns
    33                 int     maxvertices; //maxvertices corresponds to largest amount of vertices on a given element, determined by the geometry.
    34                 int     maxnodes;    // maxnodes corresponds to the largest amout of nodes on a given element, determined by the interpolation type.
    35                
    36                 IssmDouble* values;  //result values
     30                int         numrows;       //number of results held in Patch object
     31                int         numcols;       //number of columns
     32                int         maxvertices;   //largest amount of vertices on a given element, determined by geometry
     33                int         maxnodes;      //the largest amout of nodes on a given element, determined by interpolation
     34                IssmDouble *values;        //result values
    3735
    3836                Patch();
  • issm/trunk-jpl/src/c/classes/Update.h

    r12821 r13413  
    3333
    3434#endif //ifndef _UPDATE_H_
    35 
  • issm/trunk-jpl/src/c/classes/objects/Contour.h

    r13220 r13413  
    2222        public:
    2323
    24                 int     id;
    25                 int       nods;  //number of vertices in the contour
    26                 doubletype* x;
    27                 doubletype* y;
    28                 bool    closed; //is this contour closed?
     24                int         id;
     25                int         nods;     //number of vertices in the contour
     26                doubletype *x;
     27                doubletype *y;
     28                bool        closed;  //is this contour closed?
    2929
    3030                /*Contour constructors, destructors :*/
    31                 /*FUNCTION Contour() default constructor {{{*/
     31                /*FUNCTION Contour() {{{*/
    3232                Contour(){
    33                         this->id=0;
    34                         this->nods=0;
    35                         this->x=NULL;
    36                         this->y=NULL;
    37                         this->closed=false;
     33                        this->id     = 0;
     34                        this->nods   = 0;
     35                        this->x      = NULL;
     36                        this->y      = NULL;
     37                        this->closed = false;
    3838                }
    3939                /*}}}*/
     
    4141                Contour(int pid,int pnods, doubletype* px, doubletype* py,bool pclosed){
    4242
    43                         this->id=pid;
    44                         this->nods=pnods;
    45                         this->closed=pclosed;
     43                        this->id     = pid;
     44                        this->nods   = pnods;
     45                        this->closed = pclosed;
    4646                        if(nods){
    4747                                this->x=xNew<doubletype>(nods);
     
    5252                }
    5353                /*}}}*/
    54                 /*FUNCTION Contour() default constructor {{{*/
     54                /*FUNCTION ~Contour() {{{*/
    5555                ~Contour(){
    5656                        xDelete<doubletype>(this->x);
     
    5959                /*}}}*/
    6060
    61 
    6261                /*Object virtual function resolutoin: */
    6362                /*FUNCTION Echo(){{{*/
    6463                void Echo(void){
    65 
    66                         int i;
    67 
    68                         _printLine_("Contour: " << id);
    69                         _printLine_("   nods: " << nods);
    70                         _printLine_("   closed: " << (closed?"true":"false"));
     64                        _printLine_(" Contour: " << id);
     65                        _printLine_("    nods: " << nods);
     66                        _printLine_("  closed: " << (closed?"true":"false"));
    7167                        if(nods){
    72                                 _printLine_("   x,y:");
    73                                 for(i=0;i<nods;i++){
    74                                         _printLine_(i << ": " << x[i] << "|" << y[i]);
     68                                _printLine_("   x , y:");
     69                                for(int i=0;i<nods;i++){
     70                                        _printLine_(i << ": " << x[i] << " | " << y[i]);
    7571                                }
    7672                        }
     
    8884                /*}}}*/
    8985                /*FUNCTION MyRank{{{*/
    90                 int    MyRank(void){
     86                int MyRank(void){
    9187                        extern int my_rank;
    92 
    9388                        return my_rank;
    9489                }
     
    9691                /*FUNCTION ObjectEnum{{{*/
    9792                int ObjectEnum(void){
    98 
    9993                        return ContourEnum;
    100 
    10194                }
    10295                /*}}}*/
    10396                /*FUNCTION copy {{{*/
    10497                Object* copy() {
    105 
    10698                        return new Contour(*this);
    107 
    10899                }
    109100                /*}}}*/
  • issm/trunk-jpl/src/c/classes/objects/Node.h

    r13410 r13413  
    2525        public:
    2626
    27                 int         id;  //unique arbitrary id.
    28                 int     sid; //sid for "serial" id, ie the rank of this node in the nodes dataset, if the dataset was serial on 1 cpu.
     27                int id;    //unique arbitrary id.
     28                int sid;   //"serial" id (rank of this node if the dataset was serial on 1 cpu)
    2929                               
    30                 DofIndexing    indexing;
    31                 Hook*          hvertex;
    32                 Inputs*        inputs; //properties of this node
    33                 int            analysis_type;
    34                 IssmDouble         coord_system[3][3];
     30                DofIndexing  indexing;
     31                Hook        *hvertex;
     32                Inputs      *inputs;              //properties of this node
     33                int          analysis_type;
     34                IssmDouble   coord_system[3][3];
    3535
    3636                /*Node constructors, destructors {{{*/
     
    4848                /*}}}*/
    4949                /*Update virtual functions definitions: {{{*/
    50                
    5150                void  InputUpdateFromVector(IssmDouble* vector, int name, int type);
    5251                void  InputUpdateFromVector(int* vector, int name, int type);
     
    9897                void   VecMerge(Vector<IssmDouble>* ug, IssmDouble* vector_serial,int setenum);
    9998                void   VecReduce(Vector<IssmDouble>* vector, IssmDouble* ug_serial,int setnum);
    100                
    101                 /*}}}*/
    102                 /*Dof Object routines {{{*/
    10399                void  DistributeDofs(int* pdofcount,int setenum);
    104100                void  OffsetDofs(int dofcount,int setenum);
  • issm/trunk-jpl/src/c/classes/objects/Object.h

    r12821 r13413  
    2020                virtual void  DeepEcho()=0;
    2121                virtual int   Id()=0;
    22                 virtual int   MyRank()=0;
    2322                virtual int   ObjectEnum()=0;
    2423                virtual Object* copy()=0;
Note: See TracChangeset for help on using the changeset viewer.