Changeset 3420


Ignore:
Timestamp:
04/07/10 15:00:38 (15 years ago)
Author:
Eric.Larour
Message:

Massive commit. Simplified diagnostic horiz. Almost compiles.

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

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/Bamgx/objects/MeshVertex.h

    r3407 r3420  
    1 #ifndef _VERTEX_H_
    2 #define _VERTEX_H_
     1#ifndef _MESHVERTEX_H_
     2#define _MESHVERTEX_H_
    33
    44#include "../../objects/objects.h"
  • issm/trunk/src/c/ConfigureObjectsx/ConfigureObjectsx.cpp

    r3378 r3420  
    1010#include "../EnumDefinitions/EnumDefinitions.h"
    1111
    12 int     ConfigureObjectsx( DataSet* elements, DataSet* loads, DataSet* nodes,DataSet* materials,DataSet* parameters){
     12int     ConfigureObjectsx( DataSet* elements, DataSet* loads, DataSet* nodes,vertices, DataSet* materials,DataSet* parameters){
    1313
    1414        int noerr=1;
     
    1919       
    2020        //_printf_("      Configuring elements...\n");
    21         elements->Configure(elements,loads,nodes,materials,parameters);
     21        elements->Configure(elements,loads,nodes,vertices,materials,parameters);
    2222        //_printf_("      Configuring loads...\n");
    23         loads->Configure(elements,loads,nodes,materials,parameters);
     23        loads->Configure(elements,loads,nodes,vertices,materials,parameters);
    2424        //_printf_("      Configuring nodes...\n");
    25         nodes->Configure(elements,loads,nodes,materials,parameters);
     25        nodes->Configure(elements,loads,nodes,vertices,materials,parameters);
     26        //_printf_("      Configuring vertices...\n");
     27        vertices->Configure(elements,loads,vertices,materials,parameters);
    2628        //_printf_("      Configuring parameters...\n");
    27         parameters->Configure(elements,loads, nodes, materials,parameters);
     29        parameters->Configure(elements,loads, nodes,vertices, materials,parameters);
    2830
    2931        return noerr;
  • issm/trunk/src/c/ConfigureObjectsx/ConfigureObjectsx.h

    r2333 r3420  
    99
    1010/* local prototypes: */
    11 int             ConfigureObjectsx( DataSet* elements, DataSet* loads, DataSet* nodes, DataSet* materials, DataSet* parameters);
     11int             ConfigureObjectsx( DataSet* elements, DataSet* loads, DataSet* nodes, DataSet* vertices, DataSet* materials, DataSet* parameters);
    1212
    1313#endif  /* _CONFIGUREOBJECTSX_H */
  • issm/trunk/src/c/DataSet/DataSet.cpp

    r3372 r3420  
    806806/*}}}*/
    807807/*FUNCTION DataSet::Configure{{{1*/
    808 void DataSet::Configure(DataSet* elements,DataSet* loads, DataSet* nodes, DataSet* materials,DataSet* parameters){
     808void DataSet::Configure(DataSet* elements,DataSet* loads, DataSet* nodes, DataSet* vertices, DataSet* materials,DataSet* parameters){
    809809
    810810        vector<Object*>::iterator object;
     
    828828                if((*object)->Enum()==NodeEnum()){
    829829                        node=(Node*)(*object);
    830                         node->Configure(nodes);
    831                 }
    832 
     830                        node->Configure(nodes,vertices);
     831                }
    833832                if((*object)->Enum()==NumparEnum()){
    834833                        numpar=(Numpar*)(*object);
  • issm/trunk/src/c/DataSet/DataSet.h

    r3417 r3420  
    1212#include <vector>
    1313#include "../toolkits/toolkits.h"
    14 #include "../objects/objects.h"
     14#include "../objects/Object.h"
    1515
    1616class DataSet{
     
    3131
    3232        public:
     33
     34                /*constructors, destructors: {{{1*/
    3335                DataSet();
    3436                DataSet(int enum_type);
    3537                ~DataSet();
     38                /*}}}*/
     39                /*management: {{{1*/
    3640
    3741                int   GetEnum();
     
    6468                void  FlagNodeSets(Vec pv_g, Vec pv_m, Vec pv_n, Vec pv_f, Vec pv_s);
    6569                void  clear();
    66                 void  Configure(DataSet* elements,DataSet* loads, DataSet* nodes, DataSet* materials,DataSet* parameters);
     70                void  Configure(DataSet* elements,DataSet* loads, DataSet* nodes, DataSet* vertices, DataSet* materials,DataSet* parameters);
    6771                Object* GetObjectByOffset(int offset);
    6872                Object* GetObjectById(int* poffset,int eid);
     
    9296                void  UpdateNodePositions(double* thickness,double* bed);
    9397                void  OutputRifts(Vec riftproperties);
     98                /*}}}*/
    9499
    95100};
  • issm/trunk/src/c/ModelProcessorx/DiagnosticHoriz/CreateElementsNodesAndMaterialsDiagnosticHoriz.cpp

    r3417 r3420  
    114114               
    115115                for (i=0;i<iomodel->numberofelements;i++){
    116                         if(my_elements[i]){
     116                        if(iomodel->my_elements[i]){
    117117                                if (*(iomodel->elements_type+2*i+0)==MacAyealFormulationEnum() | *(iomodel->elements_type+2*i+0)==PattynFormulationEnum()){ //elements of type 1 are Hutter type Tria. Don't create this elements.
    118118                                        /*Create and add penta element to elements dataset: */
     
    168168
    169169       
    170         for (i=0;i<iomodel->numberovertices;i++){
     170        for (i=0;i<iomodel->numberofvertices;i++){
    171171
    172172                /*vertices and nodes (same number, as we are running continuous galerkin formulation: */
     
    202202        vertices->Presort();
    203203        materials->Presort();
     204
     205        cleanup_and_return:
    204206       
    205207        /*Assign output pointer: */
  • issm/trunk/src/c/ModelProcessorx/Partitioning.cpp

    r3419 r3420  
    1111#include <string.h>
    1212#include "./IoModel.h"
     13#include "../shared/shared.h"
     14#include "../EnumDefinitions/EnumDefinitions.h"
     15#include "../include/macros.h"
     16#include "../include/typedefs.h"
    1317
    1418void  DiscontinuousGalerkinPartitioning(bool** pmy_elements, bool** pmy_vertices, bool** pmy_nodes, bool** pmy_bordervertices, IoModel* iomodel, ConstDataHandle iomodel_handle);
     
    2731        /*as many nodes as there are vertices */
    2832
     33        int i;
     34
    2935        extern int my_rank;
    3036        extern int num_procs;
     
    4248        Vec  bordervertices=NULL;
    4349        double* serial_bordervertices=NULL;
     50        int  el1,el2;
    4451
    4552        /*Number of vertices per elements, needed to correctly retrieve data: */
     
    6673        #else
    6774        /*In serial mode, epart is full of 0: all elements belong to cpu 0: */
    68         epart=(int*)xcalloc(md.numberofelements,sizeof(int));
     75        epart=(int*)xcalloc(iomodel->numberofelements,sizeof(int));
    6976        #endif
    7077
     
    8390        /*Used later on: */
    8491        my_vertices=(bool*)xcalloc(iomodel->numberofvertices,sizeof(bool));
    85         my_elements=(boll*)xcalloc(iomodel->numberofelements,sizeof(bool));
     92        my_elements=(bool*)xcalloc(iomodel->numberofelements,sizeof(bool));
    8693
    8794        /*Start figuring out, out of the partition, which elements belong to this cpu: */
     
    136143
    137144        /*Deal with my_nodes: */
    138         my_nodes=(bool*)xmalloc(iomodel->numberofnodes*sizeof(bool));
    139         memcpy(my_nodes,my_vertices,iomodel->numberofnodes*sizeof(bool));
     145        my_nodes=(bool*)xmalloc(iomodel->numberofvertices*sizeof(bool));
     146        memcpy(my_nodes,my_vertices,iomodel->numberofvertices*sizeof(bool));
    140147
    141148        /*Free ressources:*/
     
    157164         * the nodes and the vertices. The vertices are similar to continuous galerkin, but the nodes partitioning involves edges, which mess up sorting of
    158165         * ids. */
     166       
     167        int i,j;
    159168
    160169        /*output: */
     
    165174        bool*   my_bordervertices=NULL;
    166175
    167         /*Mathieu's code: */
     176        int     i1,i2;
     177        double  e1,e2;
     178        int     pos;
     179
    168180        /*First: get element and vertices partitioning from Continuous Galerkin: only the nodes are partitioned differently*/
    169181        ContinuousGalerkinPartitioning(&my_elements,&my_vertices,&my_nodescontinuous,&my_bordervertices,iomodel,iomodel_handle);
     
    180192
    181193        /*Allocate*/
    182         my_nodes=(int*)xcalloc(3*iomodel->numberofelements,sizeof(int));
     194        my_nodes=(bool*)xcalloc(3*iomodel->numberofelements,sizeof(int));
    183195
    184196        /*First: add all the nodes of all the elements belonging to this cpu*/
  • issm/trunk/src/c/objects/BamgGeom.h

    r3314 r3420  
    22 */
    33
    4 #ifndef BAMGGEOM_H_
    5 #define BAMGGEOM_H_
     4#ifndef _BAMGGEOM_H_
     5#define _BAMGGEOM_H_
    66
    77struct BamgGeom{
  • issm/trunk/src/c/objects/BamgMesh.h

    r3324 r3420  
    22 */
    33
    4 #ifndef BAMGMESH_H_
    5 #define BAMGMESH_H_
     4#ifndef _BAMGMESH_H_
     5#define _BAMGMESH_H_
    66
    77struct BamgMesh{
  • issm/trunk/src/c/objects/BamgOpts.h

    r3329 r3420  
    33 */
    44
    5 #ifndef BAMGOPTS_H_
    6 #define BAMGOPTS_H_
     5#ifndef _BAMGOPTS_H_
     6#define _BAMGOPTS_H_
    77
    88struct BamgOpts{
  • issm/trunk/src/c/objects/Beam.h

    r3402 r3420  
    1717class Object;
    1818class DataSet;
     19class Element;
     20class Hook;
     21class ElementProperties;
    1922
    2023class Beam: public Element{
  • issm/trunk/src/c/objects/Contour.h

    r1 r3420  
    44 */
    55
    6 #ifndef CONTOUR_H_
    7 #define CONTOUR_H_
     6#ifndef _CONTOUR_H_
     7#define _CONTOUR_H_
    88
    99/*!Contour declaration: */
  • issm/trunk/src/c/objects/DakotaPlugin.h

    r1843 r3420  
    22 */
    33
    4 #ifndef DAKOTAPLUGIN_H
    5 #define DAKOTAPLUGIN_H
     4#ifndef _DAKOTAPLUGIN_H
     5#define _DAKOTAPLUGIN_H
    66
    77
  • issm/trunk/src/c/objects/DofIndexing.cpp

    r3417 r3420  
    3939/*FUNCTION DofIndexing constructor {{{1*/
    4040DofIndexing::DofIndexing(int in_numberofdofs, int in_partitionborder){
     41
     42        this->Init(in_numberofdofs,in_partitionborder);
     43}
     44/*}}}*/
     45/*FUNCTION DofIndexing Init: used by constructor {{{1*/
     46void DofIndexing::Init(int in_numberofdofs, int in_partitionborder){
    4147
    4248        int i;
  • issm/trunk/src/c/objects/DofIndexing.h

    r3417 r3420  
    2929                DofIndexing();
    3030                DofIndexing(int numberofdofs, int partitionborder);
     31                void Init(int numberofdofs, int partitionborder);
    3132                DofIndexing(DofIndexing* properties);
    3233                ~DofIndexing();
  • issm/trunk/src/c/objects/ElementProperties.cpp

    r3417 r3420  
    4949
    5050ElementProperties::ElementProperties(int elementproperties_numnodes, double* elementproperties_h,double* elementproperties_s,double* elementproperties_b,
     51                double* elementproperties_k,double* elementproperties_melting,double* elementproperties_accumulation,
     52                double* elementproperties_geothermalflux, int elementproperties_friction_type,double elementproperties_p,
     53                double elementproperties_q, int elementproperties_shelf, int elementproperties_onbed, bool elementproperties_onwater,
     54                int elementproperties_onsurface, int elementproperties_collapse, int elementproperties_thermal_steadystate){
     55
     56        this->Init(elementproperties_numnodes, elementproperties_h,elementproperties_s,elementproperties_b,
     57                elementproperties_k,elementproperties_melting,elementproperties_accumulation,
     58                elementproperties_geothermalflux, elementproperties_friction_type,elementproperties_p,
     59                elementproperties_q, elementproperties_shelf, elementproperties_onbed, elementproperties_onwater,
     60                elementproperties_onsurface, elementproperties_collapse, elementproperties_thermal_steadystate);
     61}
     62/*}}}*/
     63/*FUNCTION ElementProperties Initialize propreties, used by constructor{{{1*/
     64void ElementProperties::Init(int elementproperties_numnodes, double* elementproperties_h,double* elementproperties_s,double* elementproperties_b,
    5165                double* elementproperties_k,double* elementproperties_melting,double* elementproperties_accumulation,
    5266                double* elementproperties_geothermalflux, int elementproperties_friction_type,double elementproperties_p,
     
    92106        this->collapse=elementproperties_collapse;
    93107        this->thermal_steadystate=elementproperties_thermal_steadystate;
    94        
    95         return;
    96 }
    97 /*}}}*/
    98 /*FUNCTION ElementProperties constructor {{{1*/
    99 
    100 ElementProperties::ElementProperties(int elementproperties_numnodes, double* elementproperties_h,double* elementproperties_s,double* elementproperties_b,
    101                 double* elementproperties_k,double* elementproperties_melting,double* elementproperties_accumulation,
    102                 double* elementproperties_geothermalflux, int elementproperties_friction_type,double elementproperties_p,
    103                 double elementproperties_q, int elementproperties_shelf, int elementproperties_onbed, bool elementproperties_onwater,
    104                 int elementproperties_onsurface, int elementproperties_collapse, int elementproperties_thermal_steadystate){
    105 
    106         this->Init(elementproperties_numnodes, elementproperties_h,elementproperties_s,elementproperties_b,
    107                 elementproperties_k,elementproperties_melting,elementproperties_accumulation,
    108                 elementproperties_geothermalflux, elementproperties_friction_type,elementproperties_p,
    109                 elementproperties_q, elementproperties_shelf, elementproperties_onbed, elementproperties_onwater,
    110                 elementproperties_onsurface, elementproperties_collapse, elementproperties_thermal_steadystate);
    111 }
    112 /*}}}*/
    113 /*FUNCTION ElementProperties Initialize propreties, used by constructor{{{1*/
    114 ElementProperties::Init(int elementproperties_numnodes, double* elementproperties_h,double* elementproperties_s,double* elementproperties_b,
    115                 double* elementproperties_k,double* elementproperties_melting,double* elementproperties_accumulation,
    116                 double* elementproperties_geothermalflux, int elementproperties_friction_type,double elementproperties_p,
    117                 double elementproperties_q, int elementproperties_shelf, int elementproperties_onbed, bool elementproperties_onwater,
    118                 int elementproperties_onsurface, int elementproperties_collapse, int elementproperties_thermal_steadystate){
    119 
    120         int i;
    121 
    122         this->numnodes=prop->numnodes;
    123 
    124         if(prop->h)this->h=(double*)xmalloc(this->numnodes*sizeof(double));
    125         else this->h=NULL;
    126         if(prop->s)this->s=(double*)xmalloc(this->numnodes*sizeof(double));
    127         else this->s=NULL;
    128         if(prop->b)this->b=(double*)xmalloc(this->numnodes*sizeof(double));
    129         else this->b=NULL;
    130         if(prop->k)this->k=(double*)xmalloc(this->numnodes*sizeof(double));
    131         else this->k=NULL;
    132         if(prop->melting)this->melting=(double*)xmalloc(this->numnodes*sizeof(double));
    133         else this->melting=NULL;
    134         if(prop->accumulation)this->accumulation=(double*)xmalloc(this->numnodes*sizeof(double));
    135         else this->accumulation=NULL;
    136         if(prop->geothermalflux)this->geothermalflux=(double*)xmalloc(this->numnodes*sizeof(double));
    137         else this->geothermalflux=NULL;
    138 
    139         for(i=0;i<this->numnodes;i++){
    140                 if(prop->h)this->h[i]=prop->h[i];
    141                 if(prop->s)this->s[i]=prop->s[i];
    142                 if(prop->b)this->b[i]=prop->b[i];
    143                 if(prop->k)this->k[i]=prop->k[i];
    144                 if(prop->melting)this->melting[i]=prop->melting[i];
    145                 if(prop->accumulation)this->accumulation[i]=prop->accumulation[i];
    146                 if(prop->geothermalflux)this->geothermalflux[i]=prop->geothermalflux[i];
    147         }
    148        
    149         this->friction_type=prop->friction_type;
    150         this->p=prop->p;
    151         this->q=prop->q;
    152         this->shelf=prop->shelf;
    153         this->onbed=prop->onbed;
    154         this->onwater=prop->onwater;
    155         this->onsurface=prop->onsurface;
    156         this->collapse=prop->collapse;
    157         this->thermal_steadystate=prop->thermal_steadystate;
    158108
    159109        return;
  • issm/trunk/src/c/objects/ElementProperties.h

    r3417 r3420  
    3333                ElementProperties();
    3434                ElementProperties(int numnodes, double* h, double* s, double* b, double* k, double* melting, double* accumulation, double* geothermalflux, int friction_type, double p, double q, int shelf, int onbed, bool onwater, int onsurface, int collapse, int thermal_steadystate);
    35                 Init(int numnodes, double* h, double* s, double* b, double* k, double* melting, double* accumulation, double* geothermalflux, int friction_type, double p, double q, int shelf, int onbed, bool onwater, int onsurface, int collapse, int thermal_steadystate);
     35                void Init(int numnodes, double* h, double* s, double* b, double* k, double* melting, double* accumulation, double* geothermalflux, int friction_type, double p, double q, int shelf, int onbed, bool onwater, int onsurface, int collapse, int thermal_steadystate);
    3636                ElementProperties(ElementProperties* properties);
    3737                ~ElementProperties();
  • issm/trunk/src/c/objects/FemModel.h

    r3417 r3420  
    33 */
    44
    5 #ifndef FEMMODEL_H_
    6 #define FEMMODEL_H_
     5#ifndef _FEMMODEL_H_
     6#define _FEMMODEL_H_
     7
     8class DataSet;
     9class DofVec;
    710
    811#include "./Object.h"
     
    6265                DataSet* get_elements(void);
    6366                DataSet* get_nodes(void);
    64                 DataSet* get_vertices(void){return vertices ;}
     67                DataSet* get_vertices(void);
    6568                DataSet* get_constraints(void);
    6669                DataSet* get_loads(void);
  • issm/trunk/src/c/objects/Hook.cpp

    r3417 r3420  
    3838/*}}}*/
    3939/*FUNCTION Hook::Init(int* ids, int num){{{1*/
    40 Hook::Init(int* in_ids, int in_num){
     40void Hook::Init(int* in_ids, int in_num){
    4141
    4242        int i;
  • issm/trunk/src/c/objects/Hook.h

    r3417 r3420  
    99#define _HOOK_H_
    1010
     11class DataSet;
     12class Object;
     13
    1114#include "./Object.h"
    1215#include "../DataSet/DataSet.h"
    1316#include "../toolkits/toolkits.h"
    1417
    15 class DataSet;
    1618class Hook{
    1719
     
    2729                Hook();
    2830                Hook(int* ids, int num);
    29                 Init(int* ids, int num);
     31                void Init(int* ids, int num);
    3032                Hook(Object** objects, int* ids, int* offsets,int num);
    3133                Hook(Hook* hook);
  • issm/trunk/src/c/objects/Icefront.h

    r3107 r3420  
    55#ifndef _ICEFRONT_H_
    66#define _ICEFRONT_H_
     7
     8class Element;
     9class Load;
     10class Matpar;
     11class Element;
     12class Node;
    713
    814#include "./Load.h"
     
    1420#define ICEFRONTSTRING 20 //max string length
    1521
    16 class Element;
    1722class Icefront: public Load {
    1823
  • issm/trunk/src/c/objects/Load.h

    r803 r3420  
    88#ifndef _LOAD_H_
    99#define _LOAD_H_
     10
     11class Object;
    1012
    1113#include "./Object.h"
  • issm/trunk/src/c/objects/Material.h

    r803 r3420  
    66#ifndef _MATERIAL_H_
    77#define _MATERIAL_H_
     8
     9class Object;
    810
    911#include "./Object.h"
  • issm/trunk/src/c/objects/Matice.cpp

    r3417 r3420  
    2828/*}}}*/
    2929/*FUNCTION Matice::init {{{1*/
    30 Matice::Init(int in_mid,double in_B,double in_n){
     30void Matice::Init(int in_mid,double in_B,double in_n){
    3131        this->mid=in_mid;
    3232        this->B=in_B;
  • issm/trunk/src/c/objects/Matice.h

    r3417 r3420  
    66#define MATICE_H_
    77
     8struct IoModel;
     9
    810#include "./Material.h"
    9 
     11#include "../ModelProcessorx/IoModel.h"
    1012class Matice: public Material{
    1113
     
    2022                Matice(int mid,double B,double n);
    2123                Matice(int i, IoModel* iomodel, int num_vertices);
    22                 Init(int mid,double B,double n);
     24                void Init(int mid,double B,double n);
    2325                ~Matice();
    2426
  • issm/trunk/src/c/objects/Matpar.cpp

    r3417 r3420  
    6262/*}}}1*/
    6363/*FUNCTION Matpar::Init {{{1*/
    64 Matpar::Init(int        matpar_mid, double      matpar_rho_ice, double  matpar_rho_water, double  matpar_heatcapacity, double  matpar_thermalconductivity, double  matpar_latentheat, double  matpar_beta, double  matpar_meltingpoint, double  matpar_mixed_layer_capacity, double  matpar_thermal_exchange_velocity, double  matpar_g){
     64void Matpar::Init(int   matpar_mid, double      matpar_rho_ice, double  matpar_rho_water, double  matpar_heatcapacity, double  matpar_thermalconductivity, double  matpar_latentheat, double  matpar_beta, double  matpar_meltingpoint, double  matpar_mixed_layer_capacity, double  matpar_thermal_exchange_velocity, double  matpar_g){
    6565
    6666        this->mid=matpar_mid;
  • issm/trunk/src/c/objects/Matpar.h

    r3417 r3420  
    66#define _MATPAR_H_
    77
     8struct IoModel;
     9
    810#include "./Material.h"
     11#include "../ModelProcessorx/IoModel.h"
    912
    1013class Matpar: public Material{
     
    2831       
    2932                Matpar(int      mid, double     rho_ice, double rho_water, double  heatcapacity, double  thermalconductivity, double  latentheat, double  beta, double  meltingpoint, double  mixed_layer_capacity, double  thermal_exchange_velocity, double  g);
    30                 Init(int        mid, double     rho_ice, double rho_water, double  heatcapacity, double  thermalconductivity, double  latentheat, double  beta, double  meltingpoint, double  mixed_layer_capacity, double  thermal_exchange_velocity, double  g);
     33                void Init(int   mid, double     rho_ice, double rho_water, double  heatcapacity, double  thermalconductivity, double  latentheat, double  beta, double  meltingpoint, double  mixed_layer_capacity, double  thermal_exchange_velocity, double  g);
    3134                Matpar(IoModel* iomodel);
    32                
    3335                ~Matpar();
    3436
  • issm/trunk/src/c/objects/Node.cpp

    r3417 r3420  
    6060        int partitionborder;
    6161        int vertex_id;
     62        int upper_node_id;
    6263
    6364
     
    6768        /*indexing:*/
    6869        DistributeNumDofs(&numdofs,iomodel->analysis_type,iomodel->sub_analysis_type); //number of dofs per node
    69         if(my_bordervertices[i])partitionborder=1; else partitionborder=0;//is this node on a partition border?
     70        if(iomodel->my_bordervertices[i])partitionborder=1; else partitionborder=0;//is this node on a partition border?
    7071
    7172        this->indexing.Init(numdofs,partitionborder);
     
    9495        }
    9596
    96         this->hvertex->Init(vertex_id,1); //node id is the same as the vertex id, continuous galerkin!
    97         this->hupper_node->Init(upper_node_id,1);
     97        this->hvertex.Init(&vertex_id,1); //node id is the same as the vertex id, continuous galerkin!
     98        this->hupper_node.Init(&upper_node_id,1);
    9899       
    99100
     
    103104                if (iomodel->deadgrids[i]){
    104105                        for(k=1;k<=numdofs;k++){
    105                                 node->FreezeDof(k);
     106                                this->FreezeDof(k);
    106107                        }
    107108                }
     
    109110        if (iomodel->gridonhutter[i]){
    110111                for(k=1;k<=numdofs;k++){
    111                         node->FreezeDof(k);
     112                        this->FreezeDof(k);
    112113                }
    113114        }
  • issm/trunk/src/c/objects/Node.h

    r3417 r3420  
    66#define _NODE_H_
    77
     8
    89/*indefinitions: */
    910class Object;
    1011class Vertex;
     12struct IoModel;
    1113class Hook;
     14class DofIndexing;
     15class NodeProperties;
     16class Node;
    1217
    1318#include "./Object.h"
     
    1823#include "./NodeProperties.h"
    1924#include "../toolkits/toolkits.h"
     25#include "../ModelProcessorx/IoModel.h"
    2026
    2127class Node: public Object{
  • issm/trunk/src/c/objects/NodeProperties.cpp

    r3417 r3420  
    3636/*}}}*/
    3737/*FUNCTION NodeProperties init: used by constructor {{{1*/
    38 NodeProperties::Init(int nodeproperties_onbed, int nodeproperties_onsurface, int nodeproperties_onshelf, int nodeproperties_onsheet){
     38void NodeProperties::Init(int nodeproperties_onbed, int nodeproperties_onsurface, int nodeproperties_onshelf, int nodeproperties_onsheet){
    3939
    4040        this->onbed=nodeproperties_onbed;
  • issm/trunk/src/c/objects/NodeProperties.h

    r3417 r3420  
    1717                NodeProperties();
    1818                NodeProperties(int onbed, int onsurface, int onshelf, int onsheet);
    19                 Init(int onbed, int onsurface, int onshelf, int onsheet);
     19                void Init(int onbed, int onsurface, int onshelf, int onsheet);
    2020                NodeProperties(NodeProperties* properties);
    2121                ~NodeProperties();
  • issm/trunk/src/c/objects/Penta.cpp

    r3417 r3420  
    5959        int offset;
    6060        int penta_node_ids[6];
     61        int penta_matice_id;
     62        int penta_matpar_id;
     63        int penta_numpar_id;
    6164        double penta_h[6];
    6265        double penta_s[6];
     
    6568        double penta_melting[6];
    6669        double penta_accumulation[6];
     70        int    penta_friction_type;
     71        double penta_p,penta_q;
     72        int    penta_shelf;
     73        bool   penta_onwater;
     74        int    penta_onsurface;
     75        int    penta_onbed;
     76        int    penta_collapse;
    6777
    6878        /*id: */
     
    7787        penta_numpar_id=1; //refers to numerical parameters object
    7888
    79         this->hnodes->Init(penta_node_ids,6);
    80         this->hmatice->Init(penta_matice_id,1);
    81         this->hmatpar->Init(penta_matpar_id,1);
    82         this->hnumpar->Init(penta_numpar_id,1);
     89        this->hnodes.Init(penta_node_ids,6);
     90        this->hmatice.Init(&penta_matice_id,1);
     91        this->hmatpar.Init(&penta_matpar_id,1);
     92        this->hnumpar.Init(&penta_numpar_id,1);
    8393
    8494        /*properties: */
     
    97107        penta_q=iomodel->q[i];
    98108        penta_shelf=(int)*(iomodel->elementoniceshelf+i);
    99         penta_onwater=(bool)*(iomodel->elementonwater+i);
     109        penta_onbed=(bool)*(iomodel->elementonbed+i);
    100110        penta_onsurface=(int)*(iomodel->elementonsurface+i);
    101111        penta_onwater=(bool)*(iomodel->elementonwater+i);
    102112
    103         if (*(iomodel->elements_type+2*i+0)==macayealformulationenum()){ //elements of type 3 are macayeal type penta. we collapse the formulation on their base.
     113        if (*(iomodel->elements_type+2*i+0)==MacAyealFormulationEnum()){ //elements of type 3 are macayeal type penta. we collapse the formulation on their base.
    104114                penta_collapse=1;
    105115        }
     
    108118        }
    109119
    110         this->properties->Init(6,penta_h, penta_s, penta_b, penta_k, penta_melting, penta_accumulation, NULL, penta_friction_type, penta_p, penta_q, penta_shelf, penta_onbed, penta_onwater, penta_onsurface, penta_collapse, UNDEF);
     120        this->properties.Init(6,penta_h, penta_s, penta_b, penta_k, penta_melting, penta_accumulation, NULL, penta_friction_type, penta_p, penta_q, penta_shelf, penta_onbed, penta_onwater, penta_onsurface, penta_collapse, UNDEF);
    111121
    112122
  • issm/trunk/src/c/objects/Penta.h

    r3417 r3420  
    55#ifndef _PENTA_H
    66#define _PENTA_H
     7
     8class Object;
     9class Node;
     10class Hook;
     11class ElementProperties;
     12class DataSet;
     13struct IoModel;
     14
    715
    816#include "./Object.h"
     
    1422#include "./Hook.h"
    1523#include "./ElementProperties.h"
     24#include "../ModelProcessorx/IoModel.h"
    1625#include "./ParameterInputs.h"
    1726#include "./Node.h"
    18 
    19 class Object;
    20 class Node;
    21 class Hook;
    22 class ElementProperties;
    23 class DataSet;
    2427
    2528class Penta: public Element{
  • issm/trunk/src/c/objects/Sing.h

    r3402 r3420  
    1313#include "./ElementProperties.h"
    1414#include "./Hook.h"
     15
     16class Hook;
     17class ElementProperties;
    1518
    1619class Sing: public Element{
  • issm/trunk/src/c/objects/Tria.cpp

    r3417 r3420  
    1010
    1111#include "stdio.h"
     12#include "./Object.h"
     13#include "./Hook.h"
    1214#include "./Tria.h"
    1315#include "./Hook.h"
     
    6769        int offset;
    6870        int tria_node_ids[3];
     71        int tria_matice_id;
     72        int tria_matpar_id;
     73        int tria_numpar_id;
    6974        double tria_h[3];
    7075        double tria_s[3];
     
    7378        double tria_melting[3];
    7479        double tria_accumulation[3];
     80        int    tria_friction_type;
     81        double tria_p,tria_q;
     82        int tria_shelf;
     83        int tria_onwater;
     84       
    7585
    7686        /*id: */
     
    8595        tria_numpar_id=1; //refers to numerical parameters object
    8696
    87         this->hnodes->Init(tria_node_ids,3);
    88         this->hmatice->Init(tria_matice_id,1);
    89         this->hmatpar->Init(tria_matpar_id,1);
    90         this->hnumpar->Init(tria_numpar_id,1);
     97        this->hnodes.Init(tria_node_ids,3);
     98        this->hmatice.Init(&tria_matice_id,1);
     99        this->hmatpar.Init(&tria_matpar_id,1);
     100        this->hnumpar.Init(&tria_numpar_id,1);
    91101
    92102        /*properties: */
     
    107117        tria_onwater=(bool)*(iomodel->elementonwater+i);
    108118       
    109         this->properties->Init(3,tria_h, tria_s, tria_b, tria_k, tria_melting, tria_accumulation, NULL,
     119        this->properties.Init(3,tria_h, tria_s, tria_b, tria_k, tria_melting, tria_accumulation, NULL,
    110120                        tria_friction_type, tria_p, tria_q, tria_shelf, UNDEF,tria_onwater, UNDEF,UNDEF,UNDEF);
    111121
     
    50195029}
    50205030/*}}}*/
    5021 /*FUNCTION MaticeConfiguration {{{1*/
    5022 void  Tria::MaticeConfiguration(Matice* tria_matice,int tria_matice_offset){
    5023 
    5024         /*dynamic objects pointed to by hooks: */
    5025         Matice* matice=NULL;
    5026 
    5027         /*recover objects from hooks: */
    5028         matice=(Matice*)hmatice.delivers();
    5029        
    5030         ISSMERROR("not supported yet!");
    5031 
    5032         /*matice=tria_matice;
    5033         matice_offset=tria_matice_offset;*/
    5034 
    5035 }
    5036 /*}}}*/
    5037 /*FUNCTION MatparConfiguration {{{1*/
    5038 void  Tria::MatparConfiguration(Matpar* tria_matpar,int tria_matpar_offset){
    5039 
    5040         /*dynamic objects pointed to by hooks: */
    5041         Matpar* matpar=NULL;
    5042 
    5043         /*recover objects from hooks: */
    5044         matpar=(Matpar*)hmatpar.delivers();
    5045 
    5046         ISSMERROR("not supported yet!");
    5047 
    5048         /*matpar=tria_matpar;
    5049         matpar_offset=tria_matpar_offset;*/
    5050 
    5051 }
    5052 /*}}}*/
    50535031/*FUNCTION Misfit {{{1*/
    50545032double Tria::Misfit(void* vinputs,int analysis_type,int sub_analysis_type){
     
    52675245}
    52685246/*}}}*/
    5269 /*FUNCTION NodeConfiguration {{{1*/
    5270 void  Tria::NodeConfiguration(int* tria_node_ids,Node* tria_nodes[3],int* tria_node_offsets){
    5271 
    5272         /*dynamic objects pointed to by hooks: */
    5273         Node**  nodes=NULL;
    5274 
    5275         /*recover objects from hooks: */
    5276         nodes=(Node**)hnodes.deliverp();
    5277 
    5278         ISSMERROR("not supported yet!");
    5279 
    5280         /*int i;
    5281         for(i=0;i<3;i++){
    5282                 node_ids[i]=tria_node_ids[i];
    5283                 nodes[i]=tria_nodes[i];
    5284                 node_offsets[i]=tria_node_offsets[i];
    5285         }*/
    5286 
    5287 }
    5288 /*}}}*/
    5289 /*FUNCTION NumparConfiguration {{{1*/
    5290 void  Tria::NumparConfiguration(Numpar* tria_numpar,int tria_numpar_offset){
    5291 
    5292         /*dynamic objects pointed to by hooks: */
    5293         Numpar* numpar=NULL;
    5294 
    5295         /*recover objects from hooks: */
    5296         numpar=(Numpar*)hnumpar.delivers();
    5297 
    5298         ISSMERROR("not supported yet!");
    5299 
    5300         /*numpar=tria_numpar;
    5301         numpar_offset=tria_numpar_offset;*/
    5302 
    5303 }
    5304 /*}}}*/
    53055247/*FUNCTION SurfaceNormal{{{1*/
    53065248
  • issm/trunk/src/c/objects/Tria.h

    r3417 r3420  
    66#define _TRIA_H_
    77
     8class Object;
     9class Element;
     10class Hook;
     11class ElementProperties;
     12class DataSet;
     13class Node;
     14struct IoModel;
    815
    916#include "./Object.h"
     
    1219#include "./Node.h"
    1320#include "./ElementProperties.h"
     21#include "../ModelProcessorx/IoModel.h"
    1422#include "../DataSet/DataSet.h"
    15 
    16 class Object;
    17 class Element;
    18 class Hook;
    19 class ElementProperties;
    20 class DataSet;
    21 class Node;
    2223
    2324class Tria: public Element{
     
    102103                void  GetThicknessList(double* thickness_list);
    103104                void  GetBedList(double* bed_list);
    104                 void  NodeConfiguration(int* tria_node_ids,Node* tria_nodes[3],int* tria_node_offsets);
    105                 void  MaticeConfiguration(Matice* matice,int matice_offset);
    106                 void  MatparConfiguration(Matpar* matpar,int matpar_offset);
    107                 void  NumparConfiguration(Numpar* tria_numpar,int tria_numpar_offset);
    108105                void  ComputePressure(Vec p_g);
    109106                void  CreateKMatrixThermal(Mat Kgg,void* inputs,int analysis_type,int sub_analysis_type);
  • issm/trunk/src/c/objects/Vertex.cpp

    r3417 r3420  
    1717#include "../include/typedefs.h"
    1818#include "../include/macros.h"
     19#include "../ModelProcessorx/IoModel.h"
    1920/*}}}*/
    2021
     
    3132/*}}}*/
    3233/*FUNCTION Vertex init, used by constructor {{{1*/
    33 Vertex::Init(int tria_id, double tria_x, double tria_y, double tria_z, double tria_sigma, int partitionborder){
     34void Vertex::Init(int tria_id, double tria_x, double tria_y, double tria_z, double tria_sigma, int partitionborder){
    3435
    3536        /*all the initialization has been done by the initializer, just fill in the id: */
     
    5051
    5152        /*is this vertex on a partition border? */
    52         if(my_bordervertices[i])partitionborder=1;
     53        if(iomodel->my_bordervertices[i])partitionborder=1;
    5354        else partitionborder=0;
    5455
  • issm/trunk/src/c/objects/Vertex.h

    r3417 r3420  
    66#define _VERTEX_H_
    77
     8#include "../ModelProcessorx/IoModel.h"
    89#include "./Object.h"
    910
     
    2627                Vertex();
    2728                Vertex(int id, double x, double y, double z, double sigma,int partitionborder);
    28                 Init(int id, double x, double y, double z, double sigma,int partitionborder);
     29                void Init(int id, double x, double y, double z, double sigma,int partitionborder);
    2930                Vertex(int i, IoModel* iomodel);
    3031                ~Vertex();
  • issm/trunk/src/c/objects/objects.h

    r3359 r3420  
    55#ifndef ALL_OBJECTS_H_
    66#define ALL_OBJECTS_H_
     7
     8class Object;
     9class Matice;
     10class Matpar;
     11class Node;
     12class Penta;
     13class Tria;
     14class Sing;
     15class Beam;
     16class Spc;
     17class Rgb;
     18class Icefront;
     19class Riftfront;
     20class Penpair;
     21class Pengrid;
     22class Numericalflux;
     23class Param;
     24class Element;
     25class NodeSets;
     26class Model;
    727
    828/*Abstract class: */
Note: See TracChangeset for help on using the changeset viewer.