Changeset 654
- Timestamp:
- 05/29/09 16:27:36 (16 years ago)
- Location:
- issm/trunk/src/c/parallel
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/parallel/thermal.cpp
r643 r654 89 89 param=(Param*)femmodels[1].parameters->FindParamObject("p_g"); 90 90 femmodels[1].parameters->DeleteObject((Object*)param); 91 92 91 93 92 _printf_("call computational core:\n"); -
issm/trunk/src/c/parallel/thermal_core.cpp
r643 r654 26 26 27 27 /*solutions vectors: */ 28 Vec* t_g=NULL;29 Vec* m_g=NULL;28 Vec* t_g=NULL; 29 Vec* m_g=NULL; 30 30 double* time=NULL; 31 31 32 32 /*flags: */ 33 int debug=0;34 int numberofdofspernode;35 int numberofnodes;36 int nsteps;33 int debug=0; 34 int numberofdofspernode; 35 int numberofnodes; 36 int nsteps; 37 37 double dt; 38 38 double ndt; -
issm/trunk/src/c/parallel/thermal_core_nonlinear.cpp
r643 r654 20 20 /*intermediary: */ 21 21 Mat Kgg=NULL; 22 Mat Kgg_nopenalty=NULL; 22 23 Mat Kff=NULL; 23 24 Mat Kfs=NULL; 24 25 Vec pg=NULL; 26 Vec pg_nopenalty=NULL; 25 27 Vec pf=NULL; 26 28 … … 36 38 char* solver_string=NULL; 37 39 int debug=0; 40 int lowmem=0; 38 41 39 42 /*Recover parameters: */ … … 45 48 fem->parameters->FindParam((void*)&solver_string,"solverstring"); 46 49 fem->parameters->FindParam((void*)&debug,"debug"); 50 fem->parameters->FindParam((void*)&lowmem,"lowmem"); 47 51 fem->parameters->FindParam((void*)&min_thermal_constraints,"min_thermal_constraints"); 48 52 … … 57 61 58 62 //*Generate system matrices 59 SystemMatricesx(&Kgg, &pg,fem->elements,fem->nodes,fem->loads,fem->materials,kflag,pflag,connectivity,numberofdofspernode,inputs,analysis_type,sub_analysis_type); 60 //apply penalties 61 PenaltySystemMatricesx(Kgg, pg,&melting_offset,fem->elements,fem->nodes,fem->loads,fem->materials,kflag,pflag,inputs,analysis_type,sub_analysis_type); 63 if (!lowmem){ 64 65 /*Compute Kgg_nopenalty and pg_nopenalty once for all: */ 66 if (count==1){ 67 SystemMatricesx(&Kgg_nopenalty, &pg_nopenalty,fem->elements,fem->nodes,fem->loads,fem->materials,kflag,pflag,connectivity,numberofdofspernode,inputs,analysis_type,sub_analysis_type); 68 } 69 70 /*Copy K_gg_nopenalty into Kgg, same for pg: */ 71 Kgg=(Mat)xmalloc(sizeof(Mat)); 72 MatDuplicate(Kgg_nopenalty,MAT_COPY_VALUES,&Kgg); 73 pg=(Vec)xmalloc(sizeof(Vec)); 74 VecDuplicate(pg_nopenalty,&pg);VecCopy(pg_nopenalty,pg); 75 76 //apply penalties each time 77 PenaltySystemMatricesx(Kgg, pg,&melting_offset,fem->elements,fem->nodes,fem->loads,fem->materials,kflag,pflag,inputs,analysis_type,sub_analysis_type); 78 } 79 else{ 80 SystemMatricesx(&Kgg, &pg,fem->elements,fem->nodes,fem->loads,fem->materials,kflag,pflag,connectivity,numberofdofspernode,inputs,analysis_type,sub_analysis_type); 81 //apply penalties 82 PenaltySystemMatricesx(Kgg, pg,&melting_offset,fem->elements,fem->nodes,fem->loads,fem->materials,kflag,pflag,inputs,analysis_type,sub_analysis_type); 83 } 62 84 63 85 /*!Reduce matrix from g to f size:*/
Note:
See TracChangeset
for help on using the changeset viewer.