Changeset 557
- Timestamp:
- 05/21/09 10:09:57 (16 years ago)
- Location:
- issm/trunk/src/c/parallel
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/parallel/CreateFemModel.cpp
r465 r557 36 36 37 37 _printf_(" specifying analysis\n"); 38 //specify analysis_type 38 39 model->analysis_type=(char*)xmalloc((strlen(analysis_type)+1)*sizeof(char)); strcpy(model->analysis_type,analysis_type); 39 model->sub_analysis_type=(char*)xmalloc((strlen(sub_analysis_type)+1)*sizeof(char)); strcpy(model->sub_analysis_type,sub_analysis_type); 40 //specify sub_analysis_type EXCEPT if thermal: we do not know if it is transient or steady yet (only the model knows)!! 41 if (strcmp(analysis_type,"thermal")!=0){ 42 model->sub_analysis_type=(char*)xmalloc((strlen(sub_analysis_type)+1)*sizeof(char)); strcpy(model->sub_analysis_type,sub_analysis_type); 43 } 40 44 41 45 _printf_(" create datasets:\n"); -
issm/trunk/src/c/parallel/thermal.cpp
r472 r557 30 30 31 31 /*initial velocity and pressure: */ 32 Vecu_g=NULL;33 Vecp_g=NULL;32 double* u_g=NULL; 33 double* p_g=NULL; 34 34 double dt; 35 35 double ndt; … … 73 73 74 74 _printf_("initialize inputs:\n"); 75 PetscSynchronizedPrintf(MPI_COMM_WORLD,"ok1\n"); 76 PetscSynchronizedFlush(MPI_COMM_WORLD); 75 77 femmodels[0].parameters->FindParam((void*)&u_g,"u_g"); 78 PetscSynchronizedPrintf(MPI_COMM_WORLD,"ok2\n"); 79 PetscSynchronizedFlush(MPI_COMM_WORLD); 80 76 81 femmodels[0].parameters->FindParam((void*)&p_g,"p_g"); 82 PetscSynchronizedPrintf(MPI_COMM_WORLD,"ok3\n"); 83 PetscSynchronizedFlush(MPI_COMM_WORLD); 84 77 85 femmodels[0].parameters->FindParam((void*)&numberofnodes,"numberofnodes"); 86 PetscSynchronizedPrintf(MPI_COMM_WORLD,"ok4\n"); 87 PetscSynchronizedFlush(MPI_COMM_WORLD); 88 78 89 femmodels[0].parameters->FindParam((void*)&dt,"dt"); 90 PetscSynchronizedPrintf(MPI_COMM_WORLD,"ok5\n"); 91 PetscSynchronizedFlush(MPI_COMM_WORLD); 92 79 93 femmodels[0].parameters->FindParam((void*)&ndt,"ndt"); 94 PetscSynchronizedPrintf(MPI_COMM_WORLD,"ok6\n"); 95 PetscSynchronizedFlush(MPI_COMM_WORLD); 96 80 97 femmodels[0].parameters->FindParam((void*)&waitonlock,"waitonlock"); 98 PetscSynchronizedPrintf(MPI_COMM_WORLD,"ok7\n"); 99 PetscSynchronizedFlush(MPI_COMM_WORLD); 100 81 101 femmodels[0].parameters->FindParam((void*)&sub_analysis_type,"sub_analysis_type"); 102 PetscSynchronizedPrintf(MPI_COMM_WORLD,"subana=%i\n",sub_analysis_type); 103 PetscSynchronizedFlush(MPI_COMM_WORLD); 104 82 105 femmodels[0].parameters->FindParam((void*)&debug,"debug"); 83 106 84 107 inputs=new ParameterInputs; 108 109 PetscSynchronizedPrintf(MPI_COMM_WORLD,"numberofnodes = %i\n",numberofnodes); 110 PetscSynchronizedFlush(MPI_COMM_WORLD); 85 111 inputs->Add("velocity",u_g,3,numberofnodes); 112 PetscSynchronizedPrintf(MPI_COMM_WORLD,"ok1\n"); 113 PetscSynchronizedFlush(MPI_COMM_WORLD); 114 86 115 inputs->Add("pressure",p_g,1,numberofnodes); 87 116 inputs->Add("dt",dt); 88 117 89 118 //erase velocities and pressure embedded in parameters 119 PetscSynchronizedPrintf(MPI_COMM_WORLD,"ok2\n"); 120 PetscSynchronizedFlush(MPI_COMM_WORLD); 121 90 122 param=(Param*)femmodels[0].parameters->FindParamObject("u_g"); 91 123 femmodels[0].parameters->DeleteObject((Object*)param); 124 PetscSynchronizedPrintf(MPI_COMM_WORLD,"ok3\n"); 125 PetscSynchronizedFlush(MPI_COMM_WORLD); 126 92 127 param=(Param*)femmodels[0].parameters->FindParamObject("p_g"); 93 128 femmodels[0].parameters->DeleteObject((Object*)param); 129 PetscSynchronizedPrintf(MPI_COMM_WORLD,"ok4\n"); 130 PetscSynchronizedFlush(MPI_COMM_WORLD); 131 94 132 param=(Param*)femmodels[1].parameters->FindParamObject("u_g"); 95 133 femmodels[1].parameters->DeleteObject((Object*)param); 134 PetscSynchronizedPrintf(MPI_COMM_WORLD,"ok5\n"); 135 PetscSynchronizedFlush(MPI_COMM_WORLD); 136 96 137 param=(Param*)femmodels[1].parameters->FindParamObject("p_g"); 97 138 femmodels[1].parameters->DeleteObject((Object*)param); 139 PetscSynchronizedPrintf(MPI_COMM_WORLD,"ok6\n"); 140 PetscSynchronizedFlush(MPI_COMM_WORLD); 98 141 99 142 if(sub_analysis_type==SteadyAnalysisEnum()){ … … 154 197 PetscFinalize(); 155 198 156 157 199 /*end module: */ 158 200 MODULEEND(); … … 160 202 return 0; //unix success return; 161 203 } 162
Note:
See TracChangeset
for help on using the changeset viewer.