Changeset 3420
- Timestamp:
- 04/07/10 15:00:38 (15 years ago)
- 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_ 3 3 4 4 #include "../../objects/objects.h" -
issm/trunk/src/c/ConfigureObjectsx/ConfigureObjectsx.cpp
r3378 r3420 10 10 #include "../EnumDefinitions/EnumDefinitions.h" 11 11 12 int ConfigureObjectsx( DataSet* elements, DataSet* loads, DataSet* nodes, DataSet* materials,DataSet* parameters){12 int ConfigureObjectsx( DataSet* elements, DataSet* loads, DataSet* nodes,vertices, DataSet* materials,DataSet* parameters){ 13 13 14 14 int noerr=1; … … 19 19 20 20 //_printf_(" Configuring elements...\n"); 21 elements->Configure(elements,loads,nodes, materials,parameters);21 elements->Configure(elements,loads,nodes,vertices,materials,parameters); 22 22 //_printf_(" Configuring loads...\n"); 23 loads->Configure(elements,loads,nodes, materials,parameters);23 loads->Configure(elements,loads,nodes,vertices,materials,parameters); 24 24 //_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); 26 28 //_printf_(" Configuring parameters...\n"); 27 parameters->Configure(elements,loads, nodes, materials,parameters);29 parameters->Configure(elements,loads, nodes,vertices, materials,parameters); 28 30 29 31 return noerr; -
issm/trunk/src/c/ConfigureObjectsx/ConfigureObjectsx.h
r2333 r3420 9 9 10 10 /* local prototypes: */ 11 int ConfigureObjectsx( DataSet* elements, DataSet* loads, DataSet* nodes, DataSet* materials, DataSet* parameters);11 int ConfigureObjectsx( DataSet* elements, DataSet* loads, DataSet* nodes, DataSet* vertices, DataSet* materials, DataSet* parameters); 12 12 13 13 #endif /* _CONFIGUREOBJECTSX_H */ -
issm/trunk/src/c/DataSet/DataSet.cpp
r3372 r3420 806 806 /*}}}*/ 807 807 /*FUNCTION DataSet::Configure{{{1*/ 808 void DataSet::Configure(DataSet* elements,DataSet* loads, DataSet* nodes, DataSet* materials,DataSet* parameters){808 void DataSet::Configure(DataSet* elements,DataSet* loads, DataSet* nodes, DataSet* vertices, DataSet* materials,DataSet* parameters){ 809 809 810 810 vector<Object*>::iterator object; … … 828 828 if((*object)->Enum()==NodeEnum()){ 829 829 node=(Node*)(*object); 830 node->Configure(nodes); 831 } 832 830 node->Configure(nodes,vertices); 831 } 833 832 if((*object)->Enum()==NumparEnum()){ 834 833 numpar=(Numpar*)(*object); -
issm/trunk/src/c/DataSet/DataSet.h
r3417 r3420 12 12 #include <vector> 13 13 #include "../toolkits/toolkits.h" 14 #include "../objects/ objects.h"14 #include "../objects/Object.h" 15 15 16 16 class DataSet{ … … 31 31 32 32 public: 33 34 /*constructors, destructors: {{{1*/ 33 35 DataSet(); 34 36 DataSet(int enum_type); 35 37 ~DataSet(); 38 /*}}}*/ 39 /*management: {{{1*/ 36 40 37 41 int GetEnum(); … … 64 68 void FlagNodeSets(Vec pv_g, Vec pv_m, Vec pv_n, Vec pv_f, Vec pv_s); 65 69 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); 67 71 Object* GetObjectByOffset(int offset); 68 72 Object* GetObjectById(int* poffset,int eid); … … 92 96 void UpdateNodePositions(double* thickness,double* bed); 93 97 void OutputRifts(Vec riftproperties); 98 /*}}}*/ 94 99 95 100 }; -
issm/trunk/src/c/ModelProcessorx/DiagnosticHoriz/CreateElementsNodesAndMaterialsDiagnosticHoriz.cpp
r3417 r3420 114 114 115 115 for (i=0;i<iomodel->numberofelements;i++){ 116 if( my_elements[i]){116 if(iomodel->my_elements[i]){ 117 117 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. 118 118 /*Create and add penta element to elements dataset: */ … … 168 168 169 169 170 for (i=0;i<iomodel->numbero vertices;i++){170 for (i=0;i<iomodel->numberofvertices;i++){ 171 171 172 172 /*vertices and nodes (same number, as we are running continuous galerkin formulation: */ … … 202 202 vertices->Presort(); 203 203 materials->Presort(); 204 205 cleanup_and_return: 204 206 205 207 /*Assign output pointer: */ -
issm/trunk/src/c/ModelProcessorx/Partitioning.cpp
r3419 r3420 11 11 #include <string.h> 12 12 #include "./IoModel.h" 13 #include "../shared/shared.h" 14 #include "../EnumDefinitions/EnumDefinitions.h" 15 #include "../include/macros.h" 16 #include "../include/typedefs.h" 13 17 14 18 void DiscontinuousGalerkinPartitioning(bool** pmy_elements, bool** pmy_vertices, bool** pmy_nodes, bool** pmy_bordervertices, IoModel* iomodel, ConstDataHandle iomodel_handle); … … 27 31 /*as many nodes as there are vertices */ 28 32 33 int i; 34 29 35 extern int my_rank; 30 36 extern int num_procs; … … 42 48 Vec bordervertices=NULL; 43 49 double* serial_bordervertices=NULL; 50 int el1,el2; 44 51 45 52 /*Number of vertices per elements, needed to correctly retrieve data: */ … … 66 73 #else 67 74 /*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)); 69 76 #endif 70 77 … … 83 90 /*Used later on: */ 84 91 my_vertices=(bool*)xcalloc(iomodel->numberofvertices,sizeof(bool)); 85 my_elements=(bo ll*)xcalloc(iomodel->numberofelements,sizeof(bool));92 my_elements=(bool*)xcalloc(iomodel->numberofelements,sizeof(bool)); 86 93 87 94 /*Start figuring out, out of the partition, which elements belong to this cpu: */ … … 136 143 137 144 /*Deal with my_nodes: */ 138 my_nodes=(bool*)xmalloc(iomodel->numberof nodes*sizeof(bool));139 memcpy(my_nodes,my_vertices,iomodel->numberof nodes*sizeof(bool));145 my_nodes=(bool*)xmalloc(iomodel->numberofvertices*sizeof(bool)); 146 memcpy(my_nodes,my_vertices,iomodel->numberofvertices*sizeof(bool)); 140 147 141 148 /*Free ressources:*/ … … 157 164 * the nodes and the vertices. The vertices are similar to continuous galerkin, but the nodes partitioning involves edges, which mess up sorting of 158 165 * ids. */ 166 167 int i,j; 159 168 160 169 /*output: */ … … 165 174 bool* my_bordervertices=NULL; 166 175 167 /*Mathieu's code: */ 176 int i1,i2; 177 double e1,e2; 178 int pos; 179 168 180 /*First: get element and vertices partitioning from Continuous Galerkin: only the nodes are partitioned differently*/ 169 181 ContinuousGalerkinPartitioning(&my_elements,&my_vertices,&my_nodescontinuous,&my_bordervertices,iomodel,iomodel_handle); … … 180 192 181 193 /*Allocate*/ 182 my_nodes=( int*)xcalloc(3*iomodel->numberofelements,sizeof(int));194 my_nodes=(bool*)xcalloc(3*iomodel->numberofelements,sizeof(int)); 183 195 184 196 /*First: add all the nodes of all the elements belonging to this cpu*/ -
issm/trunk/src/c/objects/BamgGeom.h
r3314 r3420 2 2 */ 3 3 4 #ifndef BAMGGEOM_H_5 #define BAMGGEOM_H_4 #ifndef _BAMGGEOM_H_ 5 #define _BAMGGEOM_H_ 6 6 7 7 struct BamgGeom{ -
issm/trunk/src/c/objects/BamgMesh.h
r3324 r3420 2 2 */ 3 3 4 #ifndef BAMGMESH_H_5 #define BAMGMESH_H_4 #ifndef _BAMGMESH_H_ 5 #define _BAMGMESH_H_ 6 6 7 7 struct BamgMesh{ -
issm/trunk/src/c/objects/BamgOpts.h
r3329 r3420 3 3 */ 4 4 5 #ifndef BAMGOPTS_H_6 #define BAMGOPTS_H_5 #ifndef _BAMGOPTS_H_ 6 #define _BAMGOPTS_H_ 7 7 8 8 struct BamgOpts{ -
issm/trunk/src/c/objects/Beam.h
r3402 r3420 17 17 class Object; 18 18 class DataSet; 19 class Element; 20 class Hook; 21 class ElementProperties; 19 22 20 23 class Beam: public Element{ -
issm/trunk/src/c/objects/Contour.h
r1 r3420 4 4 */ 5 5 6 #ifndef CONTOUR_H_7 #define CONTOUR_H_6 #ifndef _CONTOUR_H_ 7 #define _CONTOUR_H_ 8 8 9 9 /*!Contour declaration: */ -
issm/trunk/src/c/objects/DakotaPlugin.h
r1843 r3420 2 2 */ 3 3 4 #ifndef DAKOTAPLUGIN_H5 #define DAKOTAPLUGIN_H4 #ifndef _DAKOTAPLUGIN_H 5 #define _DAKOTAPLUGIN_H 6 6 7 7 -
issm/trunk/src/c/objects/DofIndexing.cpp
r3417 r3420 39 39 /*FUNCTION DofIndexing constructor {{{1*/ 40 40 DofIndexing::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*/ 46 void DofIndexing::Init(int in_numberofdofs, int in_partitionborder){ 41 47 42 48 int i; -
issm/trunk/src/c/objects/DofIndexing.h
r3417 r3420 29 29 DofIndexing(); 30 30 DofIndexing(int numberofdofs, int partitionborder); 31 void Init(int numberofdofs, int partitionborder); 31 32 DofIndexing(DofIndexing* properties); 32 33 ~DofIndexing(); -
issm/trunk/src/c/objects/ElementProperties.cpp
r3417 r3420 49 49 50 50 ElementProperties::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*/ 64 void ElementProperties::Init(int elementproperties_numnodes, double* elementproperties_h,double* elementproperties_s,double* elementproperties_b, 51 65 double* elementproperties_k,double* elementproperties_melting,double* elementproperties_accumulation, 52 66 double* elementproperties_geothermalflux, int elementproperties_friction_type,double elementproperties_p, … … 92 106 this->collapse=elementproperties_collapse; 93 107 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;158 108 159 109 return; -
issm/trunk/src/c/objects/ElementProperties.h
r3417 r3420 33 33 ElementProperties(); 34 34 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); 36 36 ElementProperties(ElementProperties* properties); 37 37 ~ElementProperties(); -
issm/trunk/src/c/objects/FemModel.h
r3417 r3420 3 3 */ 4 4 5 #ifndef FEMMODEL_H_ 6 #define FEMMODEL_H_ 5 #ifndef _FEMMODEL_H_ 6 #define _FEMMODEL_H_ 7 8 class DataSet; 9 class DofVec; 7 10 8 11 #include "./Object.h" … … 62 65 DataSet* get_elements(void); 63 66 DataSet* get_nodes(void); 64 DataSet* get_vertices(void) {return vertices ;}67 DataSet* get_vertices(void); 65 68 DataSet* get_constraints(void); 66 69 DataSet* get_loads(void); -
issm/trunk/src/c/objects/Hook.cpp
r3417 r3420 38 38 /*}}}*/ 39 39 /*FUNCTION Hook::Init(int* ids, int num){{{1*/ 40 Hook::Init(int* in_ids, int in_num){40 void Hook::Init(int* in_ids, int in_num){ 41 41 42 42 int i; -
issm/trunk/src/c/objects/Hook.h
r3417 r3420 9 9 #define _HOOK_H_ 10 10 11 class DataSet; 12 class Object; 13 11 14 #include "./Object.h" 12 15 #include "../DataSet/DataSet.h" 13 16 #include "../toolkits/toolkits.h" 14 17 15 class DataSet;16 18 class Hook{ 17 19 … … 27 29 Hook(); 28 30 Hook(int* ids, int num); 29 Init(int* ids, int num);31 void Init(int* ids, int num); 30 32 Hook(Object** objects, int* ids, int* offsets,int num); 31 33 Hook(Hook* hook); -
issm/trunk/src/c/objects/Icefront.h
r3107 r3420 5 5 #ifndef _ICEFRONT_H_ 6 6 #define _ICEFRONT_H_ 7 8 class Element; 9 class Load; 10 class Matpar; 11 class Element; 12 class Node; 7 13 8 14 #include "./Load.h" … … 14 20 #define ICEFRONTSTRING 20 //max string length 15 21 16 class Element;17 22 class Icefront: public Load { 18 23 -
issm/trunk/src/c/objects/Load.h
r803 r3420 8 8 #ifndef _LOAD_H_ 9 9 #define _LOAD_H_ 10 11 class Object; 10 12 11 13 #include "./Object.h" -
issm/trunk/src/c/objects/Material.h
r803 r3420 6 6 #ifndef _MATERIAL_H_ 7 7 #define _MATERIAL_H_ 8 9 class Object; 8 10 9 11 #include "./Object.h" -
issm/trunk/src/c/objects/Matice.cpp
r3417 r3420 28 28 /*}}}*/ 29 29 /*FUNCTION Matice::init {{{1*/ 30 Matice::Init(int in_mid,double in_B,double in_n){30 void Matice::Init(int in_mid,double in_B,double in_n){ 31 31 this->mid=in_mid; 32 32 this->B=in_B; -
issm/trunk/src/c/objects/Matice.h
r3417 r3420 6 6 #define MATICE_H_ 7 7 8 struct IoModel; 9 8 10 #include "./Material.h" 9 11 #include "../ModelProcessorx/IoModel.h" 10 12 class Matice: public Material{ 11 13 … … 20 22 Matice(int mid,double B,double n); 21 23 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); 23 25 ~Matice(); 24 26 -
issm/trunk/src/c/objects/Matpar.cpp
r3417 r3420 62 62 /*}}}1*/ 63 63 /*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){64 void 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){ 65 65 66 66 this->mid=matpar_mid; -
issm/trunk/src/c/objects/Matpar.h
r3417 r3420 6 6 #define _MATPAR_H_ 7 7 8 struct IoModel; 9 8 10 #include "./Material.h" 11 #include "../ModelProcessorx/IoModel.h" 9 12 10 13 class Matpar: public Material{ … … 28 31 29 32 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); 31 34 Matpar(IoModel* iomodel); 32 33 35 ~Matpar(); 34 36 -
issm/trunk/src/c/objects/Node.cpp
r3417 r3420 60 60 int partitionborder; 61 61 int vertex_id; 62 int upper_node_id; 62 63 63 64 … … 67 68 /*indexing:*/ 68 69 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? 70 71 71 72 this->indexing.Init(numdofs,partitionborder); … … 94 95 } 95 96 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); 98 99 99 100 … … 103 104 if (iomodel->deadgrids[i]){ 104 105 for(k=1;k<=numdofs;k++){ 105 node->FreezeDof(k);106 this->FreezeDof(k); 106 107 } 107 108 } … … 109 110 if (iomodel->gridonhutter[i]){ 110 111 for(k=1;k<=numdofs;k++){ 111 node->FreezeDof(k);112 this->FreezeDof(k); 112 113 } 113 114 } -
issm/trunk/src/c/objects/Node.h
r3417 r3420 6 6 #define _NODE_H_ 7 7 8 8 9 /*indefinitions: */ 9 10 class Object; 10 11 class Vertex; 12 struct IoModel; 11 13 class Hook; 14 class DofIndexing; 15 class NodeProperties; 16 class Node; 12 17 13 18 #include "./Object.h" … … 18 23 #include "./NodeProperties.h" 19 24 #include "../toolkits/toolkits.h" 25 #include "../ModelProcessorx/IoModel.h" 20 26 21 27 class Node: public Object{ -
issm/trunk/src/c/objects/NodeProperties.cpp
r3417 r3420 36 36 /*}}}*/ 37 37 /*FUNCTION NodeProperties init: used by constructor {{{1*/ 38 NodeProperties::Init(int nodeproperties_onbed, int nodeproperties_onsurface, int nodeproperties_onshelf, int nodeproperties_onsheet){38 void NodeProperties::Init(int nodeproperties_onbed, int nodeproperties_onsurface, int nodeproperties_onshelf, int nodeproperties_onsheet){ 39 39 40 40 this->onbed=nodeproperties_onbed; -
issm/trunk/src/c/objects/NodeProperties.h
r3417 r3420 17 17 NodeProperties(); 18 18 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); 20 20 NodeProperties(NodeProperties* properties); 21 21 ~NodeProperties(); -
issm/trunk/src/c/objects/Penta.cpp
r3417 r3420 59 59 int offset; 60 60 int penta_node_ids[6]; 61 int penta_matice_id; 62 int penta_matpar_id; 63 int penta_numpar_id; 61 64 double penta_h[6]; 62 65 double penta_s[6]; … … 65 68 double penta_melting[6]; 66 69 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; 67 77 68 78 /*id: */ … … 77 87 penta_numpar_id=1; //refers to numerical parameters object 78 88 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); 83 93 84 94 /*properties: */ … … 97 107 penta_q=iomodel->q[i]; 98 108 penta_shelf=(int)*(iomodel->elementoniceshelf+i); 99 penta_on water=(bool)*(iomodel->elementonwater+i);109 penta_onbed=(bool)*(iomodel->elementonbed+i); 100 110 penta_onsurface=(int)*(iomodel->elementonsurface+i); 101 111 penta_onwater=(bool)*(iomodel->elementonwater+i); 102 112 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. 104 114 penta_collapse=1; 105 115 } … … 108 118 } 109 119 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); 111 121 112 122 -
issm/trunk/src/c/objects/Penta.h
r3417 r3420 5 5 #ifndef _PENTA_H 6 6 #define _PENTA_H 7 8 class Object; 9 class Node; 10 class Hook; 11 class ElementProperties; 12 class DataSet; 13 struct IoModel; 14 7 15 8 16 #include "./Object.h" … … 14 22 #include "./Hook.h" 15 23 #include "./ElementProperties.h" 24 #include "../ModelProcessorx/IoModel.h" 16 25 #include "./ParameterInputs.h" 17 26 #include "./Node.h" 18 19 class Object;20 class Node;21 class Hook;22 class ElementProperties;23 class DataSet;24 27 25 28 class Penta: public Element{ -
issm/trunk/src/c/objects/Sing.h
r3402 r3420 13 13 #include "./ElementProperties.h" 14 14 #include "./Hook.h" 15 16 class Hook; 17 class ElementProperties; 15 18 16 19 class Sing: public Element{ -
issm/trunk/src/c/objects/Tria.cpp
r3417 r3420 10 10 11 11 #include "stdio.h" 12 #include "./Object.h" 13 #include "./Hook.h" 12 14 #include "./Tria.h" 13 15 #include "./Hook.h" … … 67 69 int offset; 68 70 int tria_node_ids[3]; 71 int tria_matice_id; 72 int tria_matpar_id; 73 int tria_numpar_id; 69 74 double tria_h[3]; 70 75 double tria_s[3]; … … 73 78 double tria_melting[3]; 74 79 double tria_accumulation[3]; 80 int tria_friction_type; 81 double tria_p,tria_q; 82 int tria_shelf; 83 int tria_onwater; 84 75 85 76 86 /*id: */ … … 85 95 tria_numpar_id=1; //refers to numerical parameters object 86 96 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); 91 101 92 102 /*properties: */ … … 107 117 tria_onwater=(bool)*(iomodel->elementonwater+i); 108 118 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, 110 120 tria_friction_type, tria_p, tria_q, tria_shelf, UNDEF,tria_onwater, UNDEF,UNDEF,UNDEF); 111 121 … … 5019 5029 } 5020 5030 /*}}}*/ 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 /*}}}*/5053 5031 /*FUNCTION Misfit {{{1*/ 5054 5032 double Tria::Misfit(void* vinputs,int analysis_type,int sub_analysis_type){ … … 5267 5245 } 5268 5246 /*}}}*/ 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 /*}}}*/5305 5247 /*FUNCTION SurfaceNormal{{{1*/ 5306 5248 -
issm/trunk/src/c/objects/Tria.h
r3417 r3420 6 6 #define _TRIA_H_ 7 7 8 class Object; 9 class Element; 10 class Hook; 11 class ElementProperties; 12 class DataSet; 13 class Node; 14 struct IoModel; 8 15 9 16 #include "./Object.h" … … 12 19 #include "./Node.h" 13 20 #include "./ElementProperties.h" 21 #include "../ModelProcessorx/IoModel.h" 14 22 #include "../DataSet/DataSet.h" 15 16 class Object;17 class Element;18 class Hook;19 class ElementProperties;20 class DataSet;21 class Node;22 23 23 24 class Tria: public Element{ … … 102 103 void GetThicknessList(double* thickness_list); 103 104 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);108 105 void ComputePressure(Vec p_g); 109 106 void CreateKMatrixThermal(Mat Kgg,void* inputs,int analysis_type,int sub_analysis_type); -
issm/trunk/src/c/objects/Vertex.cpp
r3417 r3420 17 17 #include "../include/typedefs.h" 18 18 #include "../include/macros.h" 19 #include "../ModelProcessorx/IoModel.h" 19 20 /*}}}*/ 20 21 … … 31 32 /*}}}*/ 32 33 /*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){34 void Vertex::Init(int tria_id, double tria_x, double tria_y, double tria_z, double tria_sigma, int partitionborder){ 34 35 35 36 /*all the initialization has been done by the initializer, just fill in the id: */ … … 50 51 51 52 /*is this vertex on a partition border? */ 52 if( my_bordervertices[i])partitionborder=1;53 if(iomodel->my_bordervertices[i])partitionborder=1; 53 54 else partitionborder=0; 54 55 -
issm/trunk/src/c/objects/Vertex.h
r3417 r3420 6 6 #define _VERTEX_H_ 7 7 8 #include "../ModelProcessorx/IoModel.h" 8 9 #include "./Object.h" 9 10 … … 26 27 Vertex(); 27 28 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); 29 30 Vertex(int i, IoModel* iomodel); 30 31 ~Vertex(); -
issm/trunk/src/c/objects/objects.h
r3359 r3420 5 5 #ifndef ALL_OBJECTS_H_ 6 6 #define ALL_OBJECTS_H_ 7 8 class Object; 9 class Matice; 10 class Matpar; 11 class Node; 12 class Penta; 13 class Tria; 14 class Sing; 15 class Beam; 16 class Spc; 17 class Rgb; 18 class Icefront; 19 class Riftfront; 20 class Penpair; 21 class Pengrid; 22 class Numericalflux; 23 class Param; 24 class Element; 25 class NodeSets; 26 class Model; 7 27 8 28 /*Abstract class: */
Note:
See TracChangeset
for help on using the changeset viewer.