Changeset 9356 for issm/trunk/src/c/modules/ModelProcessorx/Enthalpy
- Timestamp:
- 08/19/11 18:04:03 (14 years ago)
- Location:
- issm/trunk/src/c/modules/ModelProcessorx/Enthalpy
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/modules/ModelProcessorx/Enthalpy/CreateConstraintsEnthalpy.cpp
r9340 r9356 16 16 int i; 17 17 int count; 18 int dim; 19 int numberofvertices; 20 double heatcapacity; 21 double referencetemperature; 18 22 19 23 /*Output*/ 20 24 Constraints* constraints = NULL; 21 25 SpcStatic* spcstatic = NULL; 26 27 /*Fetch parameters: */ 28 iomodel->parameters->FindParam(&dim,DimEnum); 29 iomodel->parameters->FindParam(&numberofvertices,NumberOfVerticesEnum); 30 iomodel->parameters->FindParam(&heatcapacity,HeatcapacityEnum); 31 iomodel->parameters->FindParam(&referencetemperature,ReferencetemperatureEnum); 22 32 23 33 /*Recover pointer: */ … … 28 38 29 39 /*return if 2d mesh*/ 30 if ( iomodel->dim==2) goto cleanup_and_return;40 if (dim==2) goto cleanup_and_return; 31 41 32 42 /*Fetch data: */ … … 37 47 38 48 /*Create constraints from x,y,z: */ 39 for (i=0;i< iomodel->numberofvertices;i++){49 for (i=0;i<numberofvertices;i++){ 40 50 /*keep only this partition's nodes:*/ 41 51 if((iomodel->my_vertices[i])){ … … 43 53 if ((int)iomodel->spctemperature[2*i]){ 44 54 45 constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,1, iomodel->heatcapacity*(iomodel->spctemperature[2*i+1]-iomodel->referencetemperature),EnthalpyAnalysisEnum));55 constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,1,heatcapacity*(iomodel->spctemperature[2*i+1]-referencetemperature),EnthalpyAnalysisEnum)); 46 56 count++; 47 57 -
issm/trunk/src/c/modules/ModelProcessorx/Enthalpy/CreateNodesEnthalpy.cpp
r9340 r9356 18 18 int i; 19 19 bool continuous_galerkin=true; 20 int numberofvertices; 20 21 21 22 /*DataSets: */ 22 23 Nodes* nodes = NULL; 24 25 /*Fetch parameters: */ 26 iomodel->parameters->FindParam(&numberofvertices,NumberOfVerticesEnum); 23 27 24 28 /*Recover pointer: */ … … 39 43 iomodel->FetchData(&iomodel->nodeonwater,NULL,NULL,NodeOnWaterEnum); 40 44 41 for (i=0;i< iomodel->numberofvertices;i++){45 for (i=0;i<numberofvertices;i++){ 42 46 43 47 if(iomodel->my_vertices[i]){ -
issm/trunk/src/c/modules/ModelProcessorx/Enthalpy/UpdateElementsEnthalpy.cpp
r9343 r9356 16 16 void UpdateElementsEnthalpy(Elements* elements, IoModel* iomodel,int analysis_counter,int analysis_type){ 17 17 18 int dim; 19 int numberofelements; 20 21 /*Fetch parameters: */ 22 iomodel->parameters->FindParam(&dim,DimEnum); 23 iomodel->parameters->FindParam(&numberofelements,NumberOfElementsEnum); 24 18 25 /*Now, is the model 3d? otherwise, do nothing: */ 19 if ( iomodel->dim==2)return;26 if (dim==2)return; 20 27 21 28 /*Fetch data needed: */ … … 24 31 /*Update elements: */ 25 32 int counter=0; 26 for(int i=0;i< iomodel->numberofelements;i++){33 for(int i=0;i<numberofelements;i++){ 27 34 if(iomodel->my_elements[i]){ 28 35 Element* element=(Element*)elements->GetObjectByOffset(counter);
Note:
See TracChangeset
for help on using the changeset viewer.