Changeset 3439
- Timestamp:
- 04/07/10 16:57:43 (15 years ago)
- Location:
- issm/trunk/src/c
- Files:
-
- 20 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/ModelProcessorx/Balancedthickness/CreateConstraintsBalancedthickness.cpp
r3436 r3439 29 29 count=1; 30 30 /*Create spcs from x,y,z, as well as the spc values on those spcs: */ 31 for (i=0;i<iomodel->numberof nodes;i++){31 for (i=0;i<iomodel->numberofvertices;i++){ 32 32 #ifdef _PARALLEL_ 33 33 /*keep only this partition's nodes:*/ -
issm/trunk/src/c/ModelProcessorx/Balancedvelocities/CreateConstraintsBalancedvelocities.cpp
r3332 r3439 37 37 38 38 /*Create spcs from x,y,z, as well as the spc values on those spcs: */ 39 for (i=0;i<iomodel->numberof nodes;i++){39 for (i=0;i<iomodel->numberofvertices;i++){ 40 40 #ifdef _PARALLEL_ 41 41 /*keep only this partition's nodes:*/ -
issm/trunk/src/c/ModelProcessorx/DiagnosticHoriz/CreateElementsNodesAndMaterialsDiagnosticHoriz.cpp
r3429 r3439 23 23 DataSet* materials = NULL; 24 24 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 33 25 /*Now, is the flag macayaealpattyn on? otherwise, do nothing: */ 34 26 if (!iomodel->ismacayealpattyn)goto cleanup_and_return; -
issm/trunk/src/c/ModelProcessorx/DiagnosticHoriz/CreateLoadsDiagnosticHoriz.cpp
r3435 r3439 18 18 int segment_width; 19 19 int element; 20 int i; 20 21 21 22 /*Create loads: */ -
issm/trunk/src/c/ModelProcessorx/DiagnosticHutter/CreateConstraintsDiagnosticHutter.cpp
r3332 r3439 45 45 46 46 /*vx and vy are spc'd if we are not on gridonhutter: */ 47 for (i=0;i<iomodel->numberof nodes;i++){47 for (i=0;i<iomodel->numberofvertices;i++){ 48 48 #ifdef _PARALLEL_ 49 49 /*keep only this partition's nodes:*/ -
issm/trunk/src/c/ModelProcessorx/DiagnosticHutter/CreateElementsNodesAndMaterialsDiagnosticHutter.cpp
r3423 r3439 44 44 if (strcmp(iomodel->meshtype,"2d")==0){ 45 45 46 for (i=0;i<iomodel->numberof nodes;i++){46 for (i=0;i<iomodel->numberofvertices;i++){ 47 47 48 48 if(iomodel->my_nodes[i]){ … … 56 56 } 57 57 58 } //for (i=0;i<iomodel->numberof nodes;i++)58 } //for (i=0;i<iomodel->numberofvertices;i++) 59 59 } //if (strcmp(iomodel->meshtype,"2d")==0) 60 60 else{ 61 61 62 for (i=0;i<iomodel->numberof nodes;i++){62 for (i=0;i<iomodel->numberofvertices;i++){ 63 63 64 64 if(iomodel->my_nodes[i]){ … … 76 76 } 77 77 78 } //for (i=0;i<iomodel->numberof nodes;i++)78 } //for (i=0;i<iomodel->numberofvertices;i++) 79 79 80 80 } //if (strcmp(iomodel->meshtype,"2d")==0) … … 111 111 IoModelFetchData(&iomodel->gridoniceshelf,NULL,NULL,iomodel_handle,"gridoniceshelf"); 112 112 113 for (i=0;i<iomodel->numberof nodes;i++){113 for (i=0;i<iomodel->numberofvertices;i++){ 114 114 115 115 /*vertices and nodes (same number, as we are running continuous galerkin formulation: */ -
issm/trunk/src/c/ModelProcessorx/DiagnosticStokes/CreateConstraintsDiagnosticStokes.cpp
r3332 r3439 38 38 count=0; 39 39 /*Create spcs from x,y,z, as well as the spc values on those spcs: */ 40 for (i=0;i<iomodel->numberof nodes;i++){40 for (i=0;i<iomodel->numberofvertices;i++){ 41 41 #ifdef _PARALLEL_ 42 42 /*keep only this partition's nodes:*/ -
issm/trunk/src/c/ModelProcessorx/DiagnosticStokes/CreateLoadsDiagnosticStokes.cpp
r3438 r3439 81 81 IoModelFetchData(&iomodel->gridonstokes,NULL,NULL,iomodel_handle,"gridonstokes"); 82 82 83 for (i=0;i<iomodel->numberof nodes;i++){83 for (i=0;i<iomodel->numberofvertices;i++){ 84 84 #ifdef _PARALLEL_ 85 85 /*keep only this partition's nodes:*/ -
issm/trunk/src/c/ModelProcessorx/DiagnosticVert/CreateConstraintsDiagnosticVert.cpp
r3332 r3439 40 40 41 41 /*Create spcs from x,y,z, as well as the spc values on those spcs: */ 42 for (i=0;i<iomodel->numberof nodes;i++){42 for (i=0;i<iomodel->numberofvertices;i++){ 43 43 #ifdef _PARALLEL_ 44 44 /*keep only this partition's nodes:*/ -
issm/trunk/src/c/ModelProcessorx/Melting/CreateLoadsMelting.cpp
r3332 r3439 49 49 IoModelFetchData(&iomodel->gridonbed,NULL,NULL,iomodel_handle,"gridonbed"); 50 50 51 for (i=0;i<iomodel->numberof nodes;i++){51 for (i=0;i<iomodel->numberofvertices;i++){ 52 52 #ifdef _PARALLEL_ 53 53 /*keep only this partition's nodes:*/ -
issm/trunk/src/c/ModelProcessorx/Prognostic/CreateConstraintsPrognostic.cpp
r3332 r3439 38 38 39 39 /*Create spcs from x,y,z, as well as the spc values on those spcs: */ 40 for (i=0;i<iomodel->numberof nodes;i++){40 for (i=0;i<iomodel->numberofvertices;i++){ 41 41 #ifdef _PARALLEL_ 42 42 /*keep only this partition's nodes:*/ -
issm/trunk/src/c/ModelProcessorx/Prognostic2/CreateElementsNodesAndMaterialsPrognostic2.cpp
r3427 r3439 104 104 for (j=0;j<3;j++){ 105 105 106 if( my_nodes[3*i+j]){106 if(iomodel->my_nodes[3*i+j]){ 107 107 108 108 //Get id of the vertex on which the current node is located -
issm/trunk/src/c/ModelProcessorx/Thermal/CreateConstraintsThermal.cpp
r3332 r3439 40 40 41 41 /*Create spcs from x,y,z, as well as the spc values on those spcs: */ 42 for (i=0;i<iomodel->numberof nodes;i++){42 for (i=0;i<iomodel->numberofvertices;i++){ 43 43 #ifdef _PARALLEL_ 44 44 /*keep only this partition's nodes:*/ -
issm/trunk/src/c/ModelProcessorx/Thermal/CreateLoadsThermal.cpp
r3332 r3439 50 50 IoModelFetchData(&iomodel->spctemperature,NULL,NULL,iomodel_handle,"spctemperature"); 51 51 52 for (i=0;i<iomodel->numberof nodes;i++){52 for (i=0;i<iomodel->numberofvertices;i++){ 53 53 #ifdef _PARALLEL_ 54 54 /*keep only this partition's nodes:*/ -
issm/trunk/src/c/objects/Beam.cpp
r3404 r3439 52 52 53 53 return; 54 } 55 /*}}}*/ 56 /*FUNCTION Beam iomodel constructor {{{1*/ 57 Beam::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); 54 101 } 55 102 /*}}}*/ -
issm/trunk/src/c/objects/Beam.h
r3420 r3439 13 13 #include "./ParameterInputs.h" 14 14 #include "./ElementProperties.h" 15 #include "../ModelProcessorx/IoModel.h" 15 16 #include "./Hook.h" 16 17 … … 37 38 public: 38 39 40 /*constructors, destructors: {{{1*/ 39 41 Beam(); 40 42 Beam(int beam_id,int* beam_node_ids, int beam_matice_id, int beam_matpar_id, int beam_numpar_id, ElementProperties* beam_properties); 41 43 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); 42 45 ~Beam(); 43 46 /*}}}*/ 47 /*object management: {{{1*/ 44 48 void Echo(); 45 49 void DeepEcho(); … … 52 56 int MyRank(); 53 57 void Configure(void* loads,void* nodes,void* materials,void* parameters); 58 Object* copy(); 59 /*}}}*/ 60 /*object management: {{{1*/ 54 61 void CreateKMatrix(Mat Kgg,void* inputs,int analysis_type,int sub_analysis_type); 55 62 void CreatePVector(Vec pg, void* inputs, int analysis_type,int sub_analysis_type); … … 62 69 void* GetMatPar(); 63 70 64 Object* copy();65 71 void NodeConfiguration(int* beam_node_ids,Node* beam_nodes[2],int* beam_node_offsets); 66 72 void MaticeConfiguration(Matice* matice,int matice_offset); … … 68 74 void ComputePressure(Vec p_g); 69 75 void GetNodes(void** vpnodes); 70 71 /*not implemented: */76 /*}}}*/ 77 /*not implemented: {{{1*/ 72 78 int GetShelf(); 73 79 int GetOnBed(); … … 85 91 void GetJacobianDeterminant(double* pJdet,double* z_list, double gauss_coord); 86 92 double MassFlux(double* segment,double* ug); 93 /*}}}*/ 87 94 88 95 }; -
issm/trunk/src/c/objects/Node.cpp
r3432 r3439 128 128 if (!iomodel->gridonhutter[i]){ 129 129 for(k=1;k<=numdofs;k++){ 130 node->FreezeDof(k);130 this->FreezeDof(k); 131 131 } 132 132 } -
issm/trunk/src/c/objects/Node.h
r3430 r3439 44 44 Node(int id,DofIndexing* indexing, NodeProperties* properties, Hook* vertex, Hook* upper_node); 45 45 Node(int i, IoModel* iomodel); 46 Node(int i,int j,IoModel* iomodel); 46 47 ~Node(); 47 48 /*}}}*/ -
issm/trunk/src/c/objects/Sing.cpp
r3405 r3439 52 52 53 53 return; 54 } 55 /*}}}*/ 56 /*FUNCTION Sing iomodel constructor {{{1*/ 57 Sing::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 54 88 } 55 89 /*}}}*/ -
issm/trunk/src/c/objects/Sing.h
r3420 r3439 12 12 #include "./ParameterInputs.h" 13 13 #include "./ElementProperties.h" 14 #include "../ModelProcessorx/IoModel.h" 14 15 #include "./Hook.h" 15 16 … … 33 34 public: 34 35 36 /*constructors, destructors: {{{1*/ 35 37 Sing(); 36 38 Sing(int sing_id,int* sing_node_ids, int sing_matice_id, int sing_matpar_id, int sing_numpar_id, ElementProperties* sing_properties); 37 39 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); 38 41 ~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); 40 48 void Echo(); 41 void DeepEcho(); 49 int Enum(); 50 int GetId(); 51 char* GetName(); 42 52 void Marshall(char** pmarshalled_dataset); 43 53 int MarshallSize(); 44 char* GetName();45 void Demarshall(char** pmarshalled_dataset);46 int Enum();47 int GetId();48 54 int MyRank(); 49 void Configure(void* loads,void* nodes,void* materials,void* parameters); 55 /*}}}*/ 56 /*numerics: {{{1*/ 50 57 void CreateKMatrix(Mat Kgg,void* inputs,int analysis_type,int sub_analysis_type); 51 58 void CreatePVector(Vec pg, void* inputs, int analysis_type,int sub_analysis_type); … … 57 64 void CreatePVectorDiagnosticHutter(Vec pg,void* inputs,int analysis_type,int sub_analysis_type); 58 65 void* GetMatPar(); 59 60 Object* copy();61 66 void NodeConfiguration(int sing_node_id,Node* sing_node,int sing_node_offset); 62 67 void MaticeConfiguration(Matice* matice,int matice_offset); … … 64 69 void ComputePressure(Vec p_g); 65 70 void GetNodes(void** vpnodes); 66 67 /*not implemented: */71 /*}}}*/ 72 /*not implemented: {{{1*/ 68 73 int GetShelf(); 69 74 int GetOnBed(); … … 78 83 double CostFunction(void*,int,int); 79 84 double MassFlux(double* segment,double* ug); 85 /*}}}*/ 80 86 81 87
Note:
See TracChangeset
for help on using the changeset viewer.