Changeset 3439


Ignore:
Timestamp:
04/07/10 16:57:43 (15 years ago)
Author:
Eric.Larour
Message:

Debug

Location:
issm/trunk/src/c
Files:
20 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/ModelProcessorx/Balancedthickness/CreateConstraintsBalancedthickness.cpp

    r3436 r3439  
    2929        count=1;
    3030        /*Create spcs from x,y,z, as well as the spc values on those spcs: */
    31         for (i=0;i<iomodel->numberofnodes;i++){
     31        for (i=0;i<iomodel->numberofvertices;i++){
    3232        #ifdef _PARALLEL_
    3333        /*keep only this partition's nodes:*/
  • issm/trunk/src/c/ModelProcessorx/Balancedvelocities/CreateConstraintsBalancedvelocities.cpp

    r3332 r3439  
    3737
    3838        /*Create spcs from x,y,z, as well as the spc values on those spcs: */
    39         for (i=0;i<iomodel->numberofnodes;i++){
     39        for (i=0;i<iomodel->numberofvertices;i++){
    4040        #ifdef _PARALLEL_
    4141        /*keep only this partition's nodes:*/
  • issm/trunk/src/c/ModelProcessorx/DiagnosticHoriz/CreateElementsNodesAndMaterialsDiagnosticHoriz.cpp

    r3429 r3439  
    2323        DataSet*    materials = NULL;
    2424       
    25         /*Objects: */
    26         Node*       node   = NULL;
    27         Vertex*     vertex = NULL;
    28         Tria*       tria = NULL;
    29         Penta*      penta = NULL;
    30         Matice*     matice  = NULL;
    31         Matpar*     matpar  = NULL;
    32 
    3325        /*Now, is the flag macayaealpattyn on? otherwise, do nothing: */
    3426        if (!iomodel->ismacayealpattyn)goto cleanup_and_return;
  • issm/trunk/src/c/ModelProcessorx/DiagnosticHoriz/CreateLoadsDiagnosticHoriz.cpp

    r3435 r3439  
    1818        int segment_width;
    1919        int element;
     20        int i;
    2021
    2122        /*Create loads: */
  • issm/trunk/src/c/ModelProcessorx/DiagnosticHutter/CreateConstraintsDiagnosticHutter.cpp

    r3332 r3439  
    4545
    4646        /*vx and vy are spc'd if we are not on gridonhutter: */
    47         for (i=0;i<iomodel->numberofnodes;i++){
     47        for (i=0;i<iomodel->numberofvertices;i++){
    4848        #ifdef _PARALLEL_
    4949        /*keep only this partition's nodes:*/
  • issm/trunk/src/c/ModelProcessorx/DiagnosticHutter/CreateElementsNodesAndMaterialsDiagnosticHutter.cpp

    r3423 r3439  
    4444        if (strcmp(iomodel->meshtype,"2d")==0){
    4545
    46                 for (i=0;i<iomodel->numberofnodes;i++){
     46                for (i=0;i<iomodel->numberofvertices;i++){
    4747
    4848                        if(iomodel->my_nodes[i]){
     
    5656                        }
    5757
    58                 } //for (i=0;i<iomodel->numberofnodes;i++)
     58                } //for (i=0;i<iomodel->numberofvertices;i++)
    5959        } //if (strcmp(iomodel->meshtype,"2d")==0)
    6060        else{
    6161
    62                 for (i=0;i<iomodel->numberofnodes;i++){
     62                for (i=0;i<iomodel->numberofvertices;i++){
    6363
    6464                        if(iomodel->my_nodes[i]){
     
    7676                        }
    7777
    78                 } //for (i=0;i<iomodel->numberofnodes;i++)
     78                } //for (i=0;i<iomodel->numberofvertices;i++)
    7979
    8080        } //if (strcmp(iomodel->meshtype,"2d")==0)
     
    111111        IoModelFetchData(&iomodel->gridoniceshelf,NULL,NULL,iomodel_handle,"gridoniceshelf");
    112112
    113         for (i=0;i<iomodel->numberofnodes;i++){
     113        for (i=0;i<iomodel->numberofvertices;i++){
    114114
    115115                /*vertices and nodes (same number, as we are running continuous galerkin formulation: */
  • issm/trunk/src/c/ModelProcessorx/DiagnosticStokes/CreateConstraintsDiagnosticStokes.cpp

    r3332 r3439  
    3838        count=0;
    3939        /*Create spcs from x,y,z, as well as the spc values on those spcs: */
    40         for (i=0;i<iomodel->numberofnodes;i++){
     40        for (i=0;i<iomodel->numberofvertices;i++){
    4141        #ifdef _PARALLEL_
    4242        /*keep only this partition's nodes:*/
  • issm/trunk/src/c/ModelProcessorx/DiagnosticStokes/CreateLoadsDiagnosticStokes.cpp

    r3438 r3439  
    8181        IoModelFetchData(&iomodel->gridonstokes,NULL,NULL,iomodel_handle,"gridonstokes");
    8282       
    83         for (i=0;i<iomodel->numberofnodes;i++){
     83        for (i=0;i<iomodel->numberofvertices;i++){
    8484        #ifdef _PARALLEL_
    8585        /*keep only this partition's nodes:*/
  • issm/trunk/src/c/ModelProcessorx/DiagnosticVert/CreateConstraintsDiagnosticVert.cpp

    r3332 r3439  
    4040
    4141        /*Create spcs from x,y,z, as well as the spc values on those spcs: */
    42         for (i=0;i<iomodel->numberofnodes;i++){
     42        for (i=0;i<iomodel->numberofvertices;i++){
    4343      #ifdef _PARALLEL_
    4444                /*keep only this partition's nodes:*/
  • issm/trunk/src/c/ModelProcessorx/Melting/CreateLoadsMelting.cpp

    r3332 r3439  
    4949        IoModelFetchData(&iomodel->gridonbed,NULL,NULL,iomodel_handle,"gridonbed");
    5050
    51         for (i=0;i<iomodel->numberofnodes;i++){
     51        for (i=0;i<iomodel->numberofvertices;i++){
    5252        #ifdef _PARALLEL_
    5353        /*keep only this partition's nodes:*/
  • issm/trunk/src/c/ModelProcessorx/Prognostic/CreateConstraintsPrognostic.cpp

    r3332 r3439  
    3838
    3939        /*Create spcs from x,y,z, as well as the spc values on those spcs: */
    40         for (i=0;i<iomodel->numberofnodes;i++){
     40        for (i=0;i<iomodel->numberofvertices;i++){
    4141        #ifdef _PARALLEL_
    4242        /*keep only this partition's nodes:*/
  • issm/trunk/src/c/ModelProcessorx/Prognostic2/CreateElementsNodesAndMaterialsPrognostic2.cpp

    r3427 r3439  
    104104                for (j=0;j<3;j++){
    105105
    106                         if(my_nodes[3*i+j]){
     106                        if(iomodel->my_nodes[3*i+j]){
    107107
    108108                                //Get id of the vertex on which the current node is located
  • issm/trunk/src/c/ModelProcessorx/Thermal/CreateConstraintsThermal.cpp

    r3332 r3439  
    4040
    4141        /*Create spcs from x,y,z, as well as the spc values on those spcs: */
    42         for (i=0;i<iomodel->numberofnodes;i++){
     42        for (i=0;i<iomodel->numberofvertices;i++){
    4343        #ifdef _PARALLEL_
    4444        /*keep only this partition's nodes:*/
  • issm/trunk/src/c/ModelProcessorx/Thermal/CreateLoadsThermal.cpp

    r3332 r3439  
    5050        IoModelFetchData(&iomodel->spctemperature,NULL,NULL,iomodel_handle,"spctemperature");
    5151
    52         for (i=0;i<iomodel->numberofnodes;i++){
     52        for (i=0;i<iomodel->numberofvertices;i++){
    5353        #ifdef _PARALLEL_
    5454        /*keep only this partition's nodes:*/
  • issm/trunk/src/c/objects/Beam.cpp

    r3404 r3439  
    5252
    5353        return;
     54}
     55/*}}}*/
     56/*FUNCTION Beam iomodel constructor {{{1*/
     57Beam::Beam(int i,IoModel* iomodel){
     58
     59
     60        /*beam constructor input: */
     61        int   beam_id;
     62        int   beam_matice_id;
     63        int   beam_matpar_id;
     64        int   beam_numpar_id;
     65        int   beam_node_ids[2];
     66        double beam_h[2];
     67        double beam_s[2];
     68        double beam_b[2];
     69        double beam_k[2];
     70        int    beam_onbed;
     71       
     72       
     73        /*id: */
     74        beam_id=i+1;
     75        this->id=beam_id;
     76
     77        /*hooks: */
     78        beam_matice_id=i+1; //refers to the corresponding material property card
     79        beam_matpar_id=iomodel->numberofvertices-iomodel->numberofvertices+1;//refers to the corresponding matpar property card
     80        beam_numpar_id=1;
     81        beam_node_ids[0]=i+1;
     82        beam_node_ids[1]=(int)iomodel->uppernodes[i]; //grid that lays right on top
     83       
     84        this->hnodes.Init(beam_node_ids,2);
     85        this->hmatice.Init(&beam_matice_id,1);
     86        this->hmatpar.Init(&beam_matpar_id,1);
     87        this->hnumpar.Init(&beam_numpar_id,1);
     88
     89        /*properties: */
     90        beam_h[0]=iomodel->thickness[i];
     91        beam_h[1]=iomodel->thickness[(int)(iomodel->uppernodes[i]-1)];
     92        beam_s[0]=iomodel->surface[i];
     93        beam_s[1]=iomodel->surface[(int)(iomodel->uppernodes[i]-1)];
     94        beam_b[0]=iomodel->bed[i];
     95        beam_b[1]=iomodel->bed[(int)(iomodel->uppernodes[i]-1)];
     96        beam_k[0]=iomodel->drag[i];
     97        beam_k[1]=iomodel->drag[(int)(iomodel->uppernodes[i]-1)];
     98        beam_onbed=(bool)iomodel->gridonbed[i];
     99
     100        this->properties.Init(2,beam_h, beam_s, beam_b, beam_k,NULL, NULL, NULL, UNDEF, UNDEF, UNDEF, UNDEF, beam_onbed, UNDEF, UNDEF, UNDEF, UNDEF);
    54101}
    55102/*}}}*/
  • issm/trunk/src/c/objects/Beam.h

    r3420 r3439  
    1313#include "./ParameterInputs.h"
    1414#include "./ElementProperties.h"
     15#include "../ModelProcessorx/IoModel.h"
    1516#include "./Hook.h"
    1617
     
    3738        public:
    3839
     40                /*constructors, destructors: {{{1*/
    3941                Beam();
    4042                Beam(int beam_id,int* beam_node_ids, int beam_matice_id, int beam_matpar_id, int beam_numpar_id, ElementProperties* beam_properties);
    4143                Beam(int beam_id,Hook* beam_hnodes, Hook* beam_hmatice, Hook* beam_hmatpar, Hook* beam_hnumpar, ElementProperties* beam_properties);
     44                Beam(int i, IoModel* iomodel);
    4245                ~Beam();
    43 
     46                /*}}}*/
     47                /*object management: {{{1*/
    4448                void  Echo();
    4549                void  DeepEcho();
     
    5256                int   MyRank();
    5357                void  Configure(void* loads,void* nodes,void* materials,void* parameters);
     58                Object* copy();
     59                /*}}}*/
     60                /*object management: {{{1*/
    5461                void  CreateKMatrix(Mat Kgg,void* inputs,int analysis_type,int sub_analysis_type);
    5562                void  CreatePVector(Vec pg, void* inputs, int analysis_type,int sub_analysis_type);
     
    6269                void* GetMatPar();
    6370
    64                 Object* copy();
    6571                void  NodeConfiguration(int* beam_node_ids,Node* beam_nodes[2],int* beam_node_offsets);
    6672                void  MaticeConfiguration(Matice* matice,int matice_offset);
     
    6874                void  ComputePressure(Vec p_g);
    6975                void  GetNodes(void** vpnodes);
    70                
    71                 /*not implemented: */
     76                /*}}}*/
     77                /*not implemented: {{{1*/
    7278                int   GetShelf();
    7379                int   GetOnBed();
     
    8591                void  GetJacobianDeterminant(double* pJdet,double* z_list, double gauss_coord);
    8692                double MassFlux(double* segment,double* ug);
     93                /*}}}*/
    8794
    8895};
  • issm/trunk/src/c/objects/Node.cpp

    r3432 r3439  
    128128        if (!iomodel->gridonhutter[i]){
    129129                for(k=1;k<=numdofs;k++){
    130                         node->FreezeDof(k);
     130                        this->FreezeDof(k);
    131131                }
    132132        }
  • issm/trunk/src/c/objects/Node.h

    r3430 r3439  
    4444                Node(int id,DofIndexing* indexing, NodeProperties* properties, Hook* vertex, Hook* upper_node);
    4545                Node(int i, IoModel* iomodel);
     46                Node(int i,int j,IoModel* iomodel);
    4647                ~Node();
    4748                /*}}}*/
  • issm/trunk/src/c/objects/Sing.cpp

    r3405 r3439  
    5252
    5353        return;
     54}
     55/*}}}*/
     56/*FUNCTION Sing iomodel constructor {{{1*/
     57Sing::Sing(int i, IoModel* iomodel){
     58
     59        int sing_matice_id;
     60        int sing_matpar_id;
     61        int sing_numpar_id;
     62       
     63        int sing_g;
     64        double sing_h;
     65        double sing_k;
     66
     67
     68        /*id: */
     69        this->id=i+1;
     70
     71        /*hooks: */
     72        sing_matice_id=i+1; //refers to the corresponding material property card
     73        sing_matpar_id=iomodel->numberofvertices+1;//refers to the corresponding matpar property card
     74        sing_numpar_id=1;
     75        sing_g=i+1;
     76
     77        this->hnodes.Init(&sing_g,1);
     78        this->hmatice.Init(&sing_matice_id,1);
     79        this->hmatpar.Init(&sing_matpar_id,1);
     80        this->hnumpar.Init(&sing_numpar_id,1);
     81
     82        /*properties: */
     83        sing_h=iomodel->thickness[i];
     84        sing_k=iomodel->drag[i];
     85
     86        this->properties.Init(1,&sing_h, NULL, NULL, &sing_k, NULL, NULL, NULL, UNDEF, UNDEF, UNDEF, UNDEF, UNDEF,UNDEF, UNDEF,UNDEF,UNDEF);
     87
    5488}
    5589/*}}}*/
  • issm/trunk/src/c/objects/Sing.h

    r3420 r3439  
    1212#include "./ParameterInputs.h"
    1313#include "./ElementProperties.h"
     14#include "../ModelProcessorx/IoModel.h"
    1415#include "./Hook.h"
    1516
     
    3334        public:
    3435
     36                /*constructors, destructors: {{{1*/
    3537                Sing();
    3638                Sing(int sing_id,int* sing_node_ids, int sing_matice_id, int sing_matpar_id, int sing_numpar_id, ElementProperties* sing_properties);
    3739                Sing(int sing_id,Hook* sing_hnodes, Hook* sing_hmatice, Hook* sing_hmatpar, Hook* sing_hnumpar, ElementProperties* sing_properties);
     40                Sing(int i, IoModel* iomodel);
    3841                ~Sing();
    39 
     42                /*}}}*/
     43                /*object management: {{{1*/
     44                void  Configure(void* loads,void* nodes,void* materials,void* parameters);
     45                Object* copy();
     46                void  DeepEcho();
     47                void  Demarshall(char** pmarshalled_dataset);
    4048                void  Echo();
    41                 void  DeepEcho();
     49                int   Enum();
     50                int   GetId();
     51                char* GetName();
    4252                void  Marshall(char** pmarshalled_dataset);
    4353                int   MarshallSize();
    44                 char* GetName();
    45                 void  Demarshall(char** pmarshalled_dataset);
    46                 int   Enum();
    47                 int   GetId();
    4854                int   MyRank();
    49                 void  Configure(void* loads,void* nodes,void* materials,void* parameters);
     55                /*}}}*/
     56                /*numerics: {{{1*/
    5057                void  CreateKMatrix(Mat Kgg,void* inputs,int analysis_type,int sub_analysis_type);
    5158                void  CreatePVector(Vec pg, void* inputs, int analysis_type,int sub_analysis_type);
     
    5764                void  CreatePVectorDiagnosticHutter(Vec pg,void* inputs,int analysis_type,int sub_analysis_type);
    5865                void* GetMatPar();
    59 
    60                 Object* copy();
    6166                void  NodeConfiguration(int sing_node_id,Node* sing_node,int sing_node_offset);
    6267                void  MaticeConfiguration(Matice* matice,int matice_offset);
     
    6469                void  ComputePressure(Vec p_g);
    6570                void  GetNodes(void** vpnodes);
    66                
    67                 /*not implemented: */
     71                /*}}}*/
     72                /*not implemented: {{{1*/
    6873                int   GetShelf();
    6974                int   GetOnBed();
     
    7883                double CostFunction(void*,int,int);
    7984                double MassFlux(double* segment,double* ug);
     85                /*}}}*/
    8086
    8187
Note: See TracChangeset for help on using the changeset viewer.