Changeset 3456
- Timestamp:
- 04/08/10 08:32:04 (15 years ago)
- Location:
- issm/trunk/src/c/ModelProcessorx
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/ModelProcessorx/Balancedvelocities/CreateConstraintsBalancedvelocities.cpp
r3452 r3456 18 18 Spc* spc = NULL; 19 19 20 /*spc intermediary data: */21 double* spcvelocity=NULL;22 23 20 /*Create constraints: */ 24 21 constraints = new DataSet(ConstraintsEnum()); 25 22 26 23 /*Fetch data: */ 27 IoModelFetchData(& spcvelocity,NULL,NULL,iomodel_handle,"spcvelocity");24 IoModelFetchData(&iomodel->spcvelocity,NULL,NULL,iomodel_handle,"spcvelocity"); 28 25 29 26 count=1; //matlab indexing … … 33 30 if((iomodel->my_vertices[i]==1)){ 34 31 35 if ((int) spcvelocity[6*i+0] && (int)spcvelocity[6*i+1]){ //spc if vx and vy are constrained32 if ((int)iomodel->spcvelocity[6*i+0] && (int)iomodel->spcvelocity[6*i+1]){ //spc if vx and vy are constrained 36 33 37 34 /*This grid needs to be spc'd: */ 38 constraints->AddObject(new Spc(count,i+1,1,pow( pow(*( spcvelocity+6*i+4),2.0) + pow(*(spcvelocity+6*i+5),2.0) ,0.5)));35 constraints->AddObject(new Spc(count,i+1,1,pow( pow(*(iomodel->spcvelocity+6*i+4),2.0) + pow(*(iomodel->spcvelocity+6*i+5),2.0) ,0.5))); 39 36 count++; 40 37 } … … 43 40 } 44 41 42 /*Free data: */ 43 xfree((void**)&iomodel->spcvelocity); 44 45 45 /*All our datasets are already order by ids. Set presort flag so that later on, when sorting is requested on these 46 46 * datasets, it will not be redone: */ 47 47 constraints->Presort(); 48 48 49 /*Free data: */50 xfree((void**)&spcvelocity);51 52 49 cleanup_and_return: 53 50 -
issm/trunk/src/c/ModelProcessorx/DiagnosticHutter/CreateLoadsDiagnosticHutter.cpp
r3332 r3456 1 1 /*! \file CreateLoadsDiagnosticHutter.c: 2 2 */ 3 4 3 5 4 #include "../../DataSet/DataSet.h" … … 10 9 #include "../../include/macros.h" 11 10 #include "../IoModel.h" 12 13 11 14 12 void CreateLoadsDiagnosticHutter(DataSet** ploads, IoModel* iomodel,ConstDataHandle iomodel_handle){ -
issm/trunk/src/c/ModelProcessorx/DiagnosticStokes/CreateConstraintsDiagnosticStokes.cpp
r3454 r3456 15 15 DataSet* constraints = NULL; 16 16 Spc* spc = NULL; 17 int count; 18 19 /*spc intermediary data: */ 20 double* gridonstokes=NULL; 17 int count=0; 21 18 22 19 /*Create constraints: */ … … 27 24 28 25 /*Fetch data: */ 29 IoModelFetchData(& gridonstokes,NULL,NULL,iomodel_handle,"gridonstokes");26 IoModelFetchData(&iomodel->gridonstokes,NULL,NULL,iomodel_handle,"gridonstokes"); 30 27 31 28 count=1; //matlab indexing … … 35 32 if((iomodel->my_vertices[i]==1)){ 36 33 37 if ((int)! gridonstokes[i]){34 if ((int)!iomodel->gridonstokes[i]){ 38 35 39 36 /*This grid will see its vx,vy and vz dofs spc'd to pattyn velocities: */ … … 50 47 } 51 48 49 /*Free data: */ 50 xfree((void**)&iomodel->gridonstokes); 51 52 52 /*All our datasets are already order by ids. Set presort flag so that later on, when sorting is requested on these 53 53 * datasets, it will not be redone: */ 54 54 constraints->Presort(); 55 56 /*Free data: */57 xfree((void**)&gridonstokes);58 55 59 56 cleanup_and_return: -
issm/trunk/src/c/ModelProcessorx/DiagnosticStokes/CreateLoadsDiagnosticStokes.cpp
r3446 r3456 10 10 #include "../IoModel.h" 11 11 12 13 12 void CreateLoadsDiagnosticStokes(DataSet** ploads, IoModel* iomodel,ConstDataHandle iomodel_handle){ 14 15 13 16 14 int i; 17 15 18 16 DataSet* loads = NULL; 19 Icefront* icefront = NULL;20 17 Pengrid* pengrid = NULL; 21 18 … … 24 21 25 22 /*pengrid intermediary data: */ 26 int pengrid_id;27 int pengrid_mparid;28 int pengrid_node_id;29 int pengrid_dof;30 double pengrid_penalty_offset;31 int pengrid_active=0;32 int pengrid_thermal_steadystate=1;33 int pengrid_stabilize_constraints=0;34 35 23 int numberofpressureloads; 36 int count; 37 24 int count=0; 38 25 39 26 /*Create loads: */ … … 50 37 IoModelFetchData(&iomodel->bed,NULL,NULL,iomodel_handle,"bed"); 51 38 52 count=0; 53 39 count=1; //matlab indexing 54 40 /*First load data:*/ 55 41 for (i=0;i<numberofpressureloads;i++){ … … 84 70 85 71 for (i=0;i<iomodel->numberofvertices;i++){ 86 #ifdef _PARALLEL_ 87 /*keep only this partition's nodes:*/ 88 if((iomodel->my_vertices[i]==1)){ 89 #endif 72 /*keep only this partition's nodes:*/ 73 if((iomodel->my_vertices[i]==1)){ 90 74 91 if ((iomodel->gridonbed[i]) && (iomodel->gridonicesheet[i]) && (iomodel->gridonstokes[i])){75 if ((iomodel->gridonbed[i]) && (iomodel->gridonicesheet[i]) && (iomodel->gridonstokes[i])){ 92 76 93 pengrid_id=count+1; //matlab indexing 94 pengrid_node_id=i+1; 95 pengrid_dof=1; 96 pengrid_penalty_offset=iomodel->penalty_offset; 97 pengrid_mparid=iomodel->numberofelements+1;//refers to the corresponding parmat property card 98 pengrid_stabilize_constraints=iomodel->stabilize_constraints; 99 pengrid= new Pengrid(pengrid_id, pengrid_node_id,pengrid_mparid,pengrid_dof, pengrid_active, pengrid_penalty_offset,pengrid_thermal_steadystate,pengrid_stabilize_constraints); 100 101 loads->AddObject(pengrid); 102 count++; 103 } 104 #ifdef _PARALLEL_ 105 } //if((iomodel->my_vertices[i]==1)) 106 #endif 77 loads->AddObject(new Pengrid(count+1, i+1,iomodel->numberofelements+1,1, 0, iomodel->penalty_offset,1,iomodel->stabilize_constraints)); 78 count++; 79 } 80 } //if((iomodel->my_vertices[i]==1)) 107 81 } 108 82 -
issm/trunk/src/c/ModelProcessorx/Melting/CreateConstraintsMelting.cpp
r3332 r3456 10 10 #include "../IoModel.h" 11 11 12 13 12 void CreateConstraintsMelting(DataSet** pconstraints, IoModel* iomodel,ConstDataHandle iomodel_handle){ 14 15 13 16 14 int i; -
issm/trunk/src/c/ModelProcessorx/Melting/CreateLoadsMelting.cpp
r3450 r3456 10 10 #include "../IoModel.h" 11 11 12 13 12 void CreateLoadsMelting(DataSet** ploads, IoModel* iomodel,ConstDataHandle iomodel_handle){ 14 13 15 14 int i; 16 int element;15 int count=0; 17 16 18 extern int my_rank;19 extern int num_procs;20 21 17 DataSet* loads = NULL; 22 23 /*pengrid intermediary data: */24 int pengrid_thermal_steadystate=1;25 int count=0;26 18 27 19 /*if 2d: return*/ … … 41 33 if (iomodel->gridonbed[i]){ 42 34 43 loads->AddObject( new Pengrid(count+1, i+1,iomodel->numberofelements+1, 1, 0, iomodel->penalty_offset, pengrid_thermal_steadystate, iomodel->stabilize_constraints)); 44 35 loads->AddObject( new Pengrid(count+1, i+1,iomodel->numberofelements+1, 1, 0, iomodel->penalty_offset, 1, iomodel->stabilize_constraints)); 45 36 count++; 46 37 } -
issm/trunk/src/c/ModelProcessorx/Prognostic/CreateConstraintsPrognostic.cpp
r3452 r3456 18 18 Spc* spc = NULL; 19 19 20 /*spc intermediary data: */21 double* spcthickness=NULL;22 23 20 /*Create constraints: */ 24 21 constraints = new DataSet(ConstraintsEnum()); 25 22 26 23 /*Fetch data: */ 27 IoModelFetchData(& spcthickness,NULL,NULL,iomodel_handle,"spcthickness");24 IoModelFetchData(&iomodel->spcthickness,NULL,NULL,iomodel_handle,"spcthickness"); 28 25 29 26 count=1;//matlab indexing … … 33 30 if((iomodel->my_vertices[i]==1)){ 34 31 35 if ((int) spcthickness[2*i]){32 if ((int)iomodel->spcthickness[2*i]){ 36 33 37 constraints->AddObject(new Spc(count,i+1,1,*( spcthickness+2*i+1)));34 constraints->AddObject(new Spc(count,i+1,1,*(iomodel->spcthickness+2*i+1))); 38 35 count++; 39 36 } 40 41 37 } //if((my_vertices[i]==1)) 42 38 } 43 39 40 /*Free data: */ 41 xfree((void**)&iomodel->spcthickness); 42 44 43 /*All our datasets are already order by ids. Set presort flag so that later on, when sorting is requested on these 45 44 * datasets, it will not be redone: */ 46 45 constraints->Presort(); 47 46 48 /*Free data: */49 xfree((void**)&spcthickness);50 51 47 cleanup_and_return: 52 48 -
issm/trunk/src/c/ModelProcessorx/Prognostic/CreateLoadsPrognostic.cpp
r3332 r3456 1 1 /*! \file CreateLoadsPrognostic.c: 2 2 */ 3 4 3 5 4 #include "../../DataSet/DataSet.h" … … 11 10 #include "../IoModel.h" 12 11 13 14 12 void CreateLoadsPrognostic(DataSet** ploads, IoModel* iomodel,ConstDataHandle iomodel_handle){ 15 13 … … 18 16 /*Create loads: */ 19 17 loads = new DataSet(LoadsEnum()); 20 21 18 22 19 /*All our datasets are already order by ids. Set presort flag so that later on, when sorting is requested on these -
issm/trunk/src/c/ModelProcessorx/SlopeCompute/CreateConstraintsSlopeCompute.cpp
r3359 r3456 2 2 * CreateConstraintsSlopeCompute.c: 3 3 */ 4 5 4 6 5 #include "../../DataSet/DataSet.h" … … 10 9 #include "../../shared/shared.h" 11 10 #include "../IoModel.h" 12 13 11 14 12 void CreateConstraintsSlopeCompute(DataSet** pconstraints, IoModel* iomodel,ConstDataHandle iomodel_handle){ -
issm/trunk/src/c/ModelProcessorx/SlopeCompute/CreateLoadsSlopeCompute.cpp
r3332 r3456 1 1 /*! \file CreateLoadsSlopeCompute.c: 2 2 */ 3 4 3 5 4 #include "../../DataSet/DataSet.h" … … 10 9 #include "../../include/macros.h" 11 10 #include "../IoModel.h" 12 13 11 14 12 void CreateLoadsSlopeCompute(DataSet** ploads, IoModel* iomodel,ConstDataHandle iomodel_handle){ -
issm/trunk/src/c/ModelProcessorx/Thermal/CreateLoadsThermal.cpp
r3450 r3456 10 10 #include "../IoModel.h" 11 11 12 13 12 void CreateLoadsThermal(DataSet** ploads, IoModel* iomodel,ConstDataHandle iomodel_handle){ 14 13 15 14 int i; 15 int count=0; 16 16 17 17 DataSet* loads = NULL; 18 18 Pengrid* pengrid = NULL; 19 20 /*pengrid intermediary data: */21 int pengrid_thermal_steadystate=1;22 23 int count=0;24 19 25 20 /*return if 2d mesh*/ … … 39 34 if (!iomodel->spctemperature[2*i]){ //No penalty applied on spc grids! 40 35 41 loads->AddObject( new Pengrid(count+1, i+1,iomodel->numberofelements+1,1, 0, iomodel->penalty_offset,pengrid_thermal_steadystate,iomodel->stabilize_constraints)); 42 36 loads->AddObject( new Pengrid(count+1, i+1,iomodel->numberofelements+1,1, 0, iomodel->penalty_offset,1,iomodel->stabilize_constraints)); 43 37 count++; 44 38 }
Note:
See TracChangeset
for help on using the changeset viewer.