1 | /*! \file Model.cpp
|
---|
2 | * \brief Model structure that mirrors the matlab workspace structure. Servers for the serial
|
---|
3 | * and parallel runs.
|
---|
4 | */
|
---|
5 |
|
---|
6 | #ifdef HAVE_CONFIG_H
|
---|
7 | #include "config.h"
|
---|
8 | #else
|
---|
9 | #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
|
---|
10 | #endif
|
---|
11 |
|
---|
12 | #include "../shared/shared.h"
|
---|
13 | #include "../io/io.h"
|
---|
14 | #include "../include/globals.h"
|
---|
15 | #include "../include/macros.h"
|
---|
16 |
|
---|
17 | #include <string.h>
|
---|
18 | #include "stdio.h"
|
---|
19 |
|
---|
20 | #include "./Model.h"
|
---|
21 |
|
---|
22 |
|
---|
23 | /*!--------------------------------------------------
|
---|
24 | NewModel
|
---|
25 | --------------------------------------------------*/
|
---|
26 |
|
---|
27 | Model* NewModel(void) {
|
---|
28 | /*! create a new Model object */
|
---|
29 | Model* model=NULL;
|
---|
30 |
|
---|
31 | model=(Model*)xmalloc(sizeof(Model));
|
---|
32 |
|
---|
33 | /*!initialize all pointers to 0: */
|
---|
34 | model->repository=NULL;
|
---|
35 | model->meshtype=NULL;
|
---|
36 | model->analysis_type=NULL;
|
---|
37 | model->sub_analysis_type=NULL;
|
---|
38 | model->qmu_analysis=0;
|
---|
39 | model->solverstring=NULL;
|
---|
40 | model->numberofresponses=0;
|
---|
41 | model->qmu_npart=0;
|
---|
42 | model->numberofelements=0;
|
---|
43 | model->numberofnodes=0;
|
---|
44 | model->x=NULL;
|
---|
45 | model->y=NULL;
|
---|
46 | model->z=NULL;
|
---|
47 | model->elements=NULL;
|
---|
48 | model->elements_type=NULL;
|
---|
49 | model->numberofnodes2d=0;
|
---|
50 | model->elements2d=NULL;
|
---|
51 | model->deadgrids=NULL;
|
---|
52 | model->numlayers=0;
|
---|
53 | model->uppernodes=NULL;
|
---|
54 | model->gridonhutter=NULL;
|
---|
55 |
|
---|
56 | model->vx_obs=NULL;
|
---|
57 | model->vy_obs=NULL;
|
---|
58 | model->vx=NULL;
|
---|
59 | model->vy=NULL;
|
---|
60 | model->vz=NULL;
|
---|
61 | model->pressure=NULL;
|
---|
62 | model->temperature=NULL;
|
---|
63 | model->melting=NULL;
|
---|
64 | model->elementonbed=NULL;
|
---|
65 | model->elementonsurface=NULL;
|
---|
66 | model->gridonbed=NULL;
|
---|
67 | model->gridonsurface=NULL;
|
---|
68 | model->gridonstokes=NULL;
|
---|
69 | model->borderstokes=NULL;
|
---|
70 | model->thickness=NULL;
|
---|
71 | model->surface=NULL;
|
---|
72 | model->bed=NULL;
|
---|
73 | model->elementoniceshelf=NULL;
|
---|
74 | model->gridonicesheet=NULL;
|
---|
75 |
|
---|
76 | model->drag_type=0;
|
---|
77 | model->drag=NULL;
|
---|
78 | model->p=NULL;
|
---|
79 | model->q=NULL;
|
---|
80 |
|
---|
81 |
|
---|
82 | model->numberofsegs_diag=0;
|
---|
83 | model->numberofsegs_diag_stokes=0;
|
---|
84 | model->segmentonneumann_diag=NULL;
|
---|
85 | model->segmentonneumann_diag_stokes=NULL;
|
---|
86 | model-> neumannvalues_diag=NULL;
|
---|
87 | model-> gridondirichlet_diag=NULL;
|
---|
88 | model-> dirichletvalues_diag=NULL;
|
---|
89 | //prognostic
|
---|
90 | model-> segmentonneumann_prog=NULL;
|
---|
91 | model-> neumannvalues_prog=NULL;
|
---|
92 | model-> gridondirichlet_prog=NULL;
|
---|
93 | model-> dirichletvalues_prog=NULL;
|
---|
94 | //prognostic2
|
---|
95 | model-> segmentonneumann_prog2=NULL;
|
---|
96 | model-> neumannvalues_prog2=NULL;
|
---|
97 | //thermal
|
---|
98 | model-> gridondirichlet_thermal=NULL;
|
---|
99 | model-> dirichletvalues_thermal=NULL;
|
---|
100 | model-> geothermalflux=NULL;
|
---|
101 |
|
---|
102 | /*!materials: */
|
---|
103 | model->rho_water=0;
|
---|
104 | model->rho_ice=0;
|
---|
105 | model->g=0;
|
---|
106 | model->n=NULL;
|
---|
107 | model->B=NULL;
|
---|
108 |
|
---|
109 | /*!control methods: */
|
---|
110 | model->control_type=NULL;
|
---|
111 |
|
---|
112 | /*!solution parameters: */
|
---|
113 | model->fit=NULL;
|
---|
114 | model->meanvel=0;
|
---|
115 | model->epsvel=0;
|
---|
116 | model->artificial_diffusivity=0;
|
---|
117 | model->nsteps=0;
|
---|
118 | model->tolx=0;
|
---|
119 | model->maxiter=NULL;
|
---|
120 | model->mincontrolconstraint=0;
|
---|
121 | model->maxcontrolconstraint=0;
|
---|
122 | model->debug=0;
|
---|
123 | model->plot=0;
|
---|
124 | model->eps_rel=0;
|
---|
125 | model->eps_abs=0;
|
---|
126 | model->dt=0;
|
---|
127 | model->ndt=0;
|
---|
128 | model->penalty_offset=0;
|
---|
129 | model->penalty_melting=0;
|
---|
130 | model->penalty_lock=0;
|
---|
131 | model->sparsity=0;
|
---|
132 | model->connectivity=0;
|
---|
133 | model->lowmem=0;
|
---|
134 | model->optscal=NULL;
|
---|
135 | model->yts=0;
|
---|
136 | model->viscosity_overshoot=0;
|
---|
137 | model->stokesreconditioning=0;
|
---|
138 | model->waitonlock=0;
|
---|
139 |
|
---|
140 | /*!thermal parameters: */
|
---|
141 | model->beta=0;
|
---|
142 | model->meltingpoint=0;
|
---|
143 | model->latentheat=0;
|
---|
144 | model->heatcapacity=0;
|
---|
145 | model->thermalconductivity=0;
|
---|
146 | model->min_thermal_constraints=0;
|
---|
147 | model->mixed_layer_capacity=0;
|
---|
148 | model->thermal_exchange_velocity=0;
|
---|
149 |
|
---|
150 |
|
---|
151 | model->numrifts=0;
|
---|
152 | model->riftsnumpenaltypairs=NULL;
|
---|
153 | model->riftspenaltypairs=NULL;
|
---|
154 | model->riftsfill=NULL;
|
---|
155 | model->riftsfriction=NULL;
|
---|
156 |
|
---|
157 | /*!penalties: */
|
---|
158 | model->numpenalties=0;
|
---|
159 | model->penalties=NULL;
|
---|
160 | model->penaltypartitioning=NULL;
|
---|
161 |
|
---|
162 | /*!basal: */
|
---|
163 | model->melting=NULL;
|
---|
164 | model->accumulation=NULL;
|
---|
165 |
|
---|
166 | /*elements type: */
|
---|
167 | model->ishutter=0;
|
---|
168 | model->ismacayealpattyn=0;
|
---|
169 | model->isstokes=0;
|
---|
170 |
|
---|
171 |
|
---|
172 | model->epart=NULL;
|
---|
173 | model->npart=NULL;
|
---|
174 | model->my_grids=NULL;
|
---|
175 | model->my_bordergrids=NULL;
|
---|
176 |
|
---|
177 | return model;
|
---|
178 | }
|
---|
179 |
|
---|
180 |
|
---|
181 | /*!--------------------------------------------------
|
---|
182 | DeleteModel
|
---|
183 | --------------------------------------------------*/
|
---|
184 |
|
---|
185 | void DeleteModel(Model** pmodel){
|
---|
186 |
|
---|
187 | /*!Recover structure: */
|
---|
188 | Model* model = *pmodel;
|
---|
189 |
|
---|
190 | int i;
|
---|
191 |
|
---|
192 | /*!Two cases here:
|
---|
193 | * - serial mode: matlab's memory manager will take care of delete model when returning from Imp. Do nothing here, so as not to confuse
|
---|
194 | * the memory manager.
|
---|
195 | * - in parallel, anything the io layer does (FetchData) did needs to be erased explicitely in the model.
|
---|
196 | */
|
---|
197 |
|
---|
198 | #ifdef _PARALLEL_
|
---|
199 | xfree((void**)&model->x);
|
---|
200 | xfree((void**)&model->y);
|
---|
201 | xfree((void**)&model->z);
|
---|
202 | xfree((void**)&model->elements);
|
---|
203 | xfree((void**)&model->elements_type);
|
---|
204 | xfree((void**)&model->gridonhutter);
|
---|
205 | if (strcmp(model->meshtype,"3d")==0){
|
---|
206 | xfree((void**)&model->elements2d);
|
---|
207 | xfree((void**)&model->deadgrids);
|
---|
208 | xfree((void**)&model->uppernodes);
|
---|
209 | }
|
---|
210 | xfree((void**)&model->solverstring);
|
---|
211 | xfree((void**)&model->elementonbed);
|
---|
212 | xfree((void**)&model->elementonsurface);
|
---|
213 | xfree((void**)&model->gridonbed);
|
---|
214 | xfree((void**)&model->gridonsurface);
|
---|
215 | xfree((void**)&model->gridonstokes);
|
---|
216 | xfree((void**)&model->borderstokes);
|
---|
217 | xfree((void**)&model->thickness);
|
---|
218 | xfree((void**)&model->surface);
|
---|
219 | xfree((void**)&model->bed);
|
---|
220 | xfree((void**)&model->vx_obs);
|
---|
221 | xfree((void**)&model->vy_obs);
|
---|
222 | xfree((void**)&model->vx);
|
---|
223 | xfree((void**)&model->vy);
|
---|
224 | xfree((void**)&model->vz);
|
---|
225 | xfree((void**)&model->pressure);
|
---|
226 | xfree((void**)&model->temperature);
|
---|
227 | xfree((void**)&model->melting);
|
---|
228 | xfree((void**)&model->drag);
|
---|
229 | xfree((void**)&model->p);
|
---|
230 | xfree((void**)&model->q);
|
---|
231 | xfree((void**)&model->elementoniceshelf);
|
---|
232 | xfree((void**)&model->gridonicesheet);
|
---|
233 | xfree((void**)&model->segmentonneumann_diag);
|
---|
234 | xfree((void**)&model->segmentonneumann_diag_stokes);
|
---|
235 | xfree((void**)&model->neumannvalues_diag);
|
---|
236 | xfree((void**)&model->gridondirichlet_diag);
|
---|
237 | xfree((void**)&model->dirichletvalues_diag);
|
---|
238 | xfree((void**)&model->segmentonneumann_prog);
|
---|
239 | xfree((void**)&model->neumannvalues_prog);
|
---|
240 | xfree((void**)&model->gridondirichlet_prog);
|
---|
241 | xfree((void**)&model->dirichletvalues_prog);
|
---|
242 | xfree((void**)&model->segmentonneumann_prog2);
|
---|
243 | xfree((void**)&model->neumannvalues_prog2);
|
---|
244 | xfree((void**)&model->gridondirichlet_thermal);
|
---|
245 | xfree((void**)&model->dirichletvalues_thermal);
|
---|
246 | xfree((void**)&model->geothermalflux);
|
---|
247 | xfree((void**)&model->melting);
|
---|
248 | xfree((void**)&model->accumulation);
|
---|
249 | xfree((void**)&model->B);
|
---|
250 | xfree((void**)&model->n);
|
---|
251 | xfree((void**)&model->fit);
|
---|
252 | xfree((void**)&model->optscal);
|
---|
253 | xfree((void**)&model->maxiter);
|
---|
254 |
|
---|
255 |
|
---|
256 | /*!Delete structure fields: */
|
---|
257 | xfree((void**)&model->repository);
|
---|
258 | xfree((void**)&model->meshtype);
|
---|
259 | xfree((void**)&model->analysis_type);
|
---|
260 | xfree((void**)&model->sub_analysis_type);
|
---|
261 |
|
---|
262 | if(model->numrifts){
|
---|
263 | for(i=0;i<model->numrifts;i++){
|
---|
264 | double* riftpenaltypairs=model->riftspenaltypairs[i];
|
---|
265 | xfree((void**)&riftpenaltypairs);
|
---|
266 | }
|
---|
267 | xfree((void**)&model->riftspenaltypairs);
|
---|
268 | xfree((void**)&model->riftsnumpenaltypairs);
|
---|
269 | xfree((void**)&model->riftsfill);
|
---|
270 | xfree((void**)&model->riftsfriction);
|
---|
271 | }
|
---|
272 |
|
---|
273 | xfree((void**)&model->penalties);
|
---|
274 | xfree((void**)&model->penaltypartitioning);
|
---|
275 |
|
---|
276 | xfree((void**)&model->control_type);
|
---|
277 |
|
---|
278 | xfree((void**)&model->epart);
|
---|
279 | xfree((void**)&model->npart);
|
---|
280 | xfree((void**)&model->my_grids);
|
---|
281 | xfree((void**)&model->my_bordergrids);
|
---|
282 |
|
---|
283 | /*!Delete entire structure: */
|
---|
284 | xfree((void**)pmodel);
|
---|
285 | #endif
|
---|
286 | }
|
---|
287 |
|
---|
288 | /*!--------------------------------------------------
|
---|
289 | ModelInit
|
---|
290 | --------------------------------------------------*/
|
---|
291 |
|
---|
292 | #undef __FUNCT__
|
---|
293 | #define __FUNCT__ "ModelInit"
|
---|
294 |
|
---|
295 | int ModelInit(Model** pmodel,ConstDataHandle model_handle){
|
---|
296 |
|
---|
297 | int i,j;
|
---|
298 |
|
---|
299 | /*output: */
|
---|
300 | Model* model=NULL;
|
---|
301 |
|
---|
302 | /*Allocate model: */
|
---|
303 | model=NewModel();
|
---|
304 |
|
---|
305 | /*In ModelInit, we get all the data that is not difficult to get, and that is small: */
|
---|
306 |
|
---|
307 | ModelFetchData((void**)&model->analysis_type,NULL,NULL,model_handle,"analysis_type","String",NULL);
|
---|
308 | ModelFetchData((void**)&model->sub_analysis_type,NULL,NULL,model_handle,"sub_analysis_type","String",NULL);
|
---|
309 | ModelFetchData((void**)&model->qmu_analysis,NULL,NULL,model_handle,"qmu_analysis","Integer",NULL);
|
---|
310 |
|
---|
311 | ModelFetchData((void**)&model->meshtype,NULL,NULL,model_handle,"type","String",NULL);
|
---|
312 | /*!Get numberofelements and numberofnodes: */
|
---|
313 | ModelFetchData((void**)&model->numberofnodes,NULL,NULL,model_handle,"numberofgrids","Integer",NULL);
|
---|
314 | ModelFetchData((void**)&model->numberofelements,NULL,NULL,model_handle,"numberofelements","Integer",NULL);
|
---|
315 | /*!In case we are running 3d, we are going to need the collapsed and non-collapsed 2d meshes, from which the 3d mesh was extruded: */
|
---|
316 | if (strcmp(model->meshtype,"3d")==0){
|
---|
317 |
|
---|
318 | /*!Deal with 2d mesh: */
|
---|
319 | ModelFetchData((void**)&model->numberofelements2d,NULL,NULL,model_handle,"numberofelements2d","Integer",NULL);
|
---|
320 | ModelFetchData((void**)&model->numberofnodes2d,NULL,NULL,model_handle,"numberofgrids2d","Integer",NULL);
|
---|
321 | ModelFetchData((void**)&model->numlayers,NULL,NULL,model_handle,"numlayers","Integer",NULL);
|
---|
322 | }
|
---|
323 |
|
---|
324 |
|
---|
325 | /*elements type: */
|
---|
326 | ModelFetchData((void**)&model->ishutter,NULL,NULL,model_handle,"ishutter","Integer",NULL);
|
---|
327 | ModelFetchData((void**)&model->ismacayealpattyn,NULL,NULL,model_handle,"ismacayealpattyn","Integer",NULL);
|
---|
328 | ModelFetchData((void**)&model->isstokes,NULL,NULL,model_handle,"isstokes","Integer",NULL);
|
---|
329 |
|
---|
330 | /*!Get drag_type, drag and p,q: */
|
---|
331 | ModelFetchData((void**)&model->drag_type,NULL,NULL,model_handle,"drag_type","Integer",NULL);
|
---|
332 |
|
---|
333 | /*!Get materials: */
|
---|
334 | ModelFetchData((void**)&model->rho_water,NULL,NULL,model_handle,"rho_water","Scalar",NULL);
|
---|
335 | ModelFetchData((void**)&model->rho_ice,NULL,NULL,model_handle,"rho_ice","Scalar",NULL);
|
---|
336 | ModelFetchData((void**)&model->g,NULL,NULL,model_handle,"g","Scalar",NULL);
|
---|
337 |
|
---|
338 | /*Get control parameters: */
|
---|
339 | ModelFetchData((void**)&model->control_type,NULL,NULL,model_handle,"control_type","String",NULL);
|
---|
340 |
|
---|
341 | /*!Get solution parameters: */
|
---|
342 | ModelFetchData((void**)&model->yts,NULL,NULL,model_handle,"yts","Scalar",NULL);
|
---|
343 | ModelFetchData((void**)&model->meanvel,NULL,NULL,model_handle,"meanvel","Scalar",NULL);
|
---|
344 | ModelFetchData((void**)&model->epsvel,NULL,NULL,model_handle,"epsvel","Scalar",NULL);
|
---|
345 | ModelFetchData((void**)&model->debug,NULL,NULL,model_handle,"debug","Integer",NULL);
|
---|
346 | ModelFetchData((void**)&model->plot,NULL,NULL,model_handle,"plot","Integer",NULL);
|
---|
347 | ModelFetchData((void**)&model->artificial_diffusivity,NULL,NULL,model_handle,"artificial_diffusivity","Integer",NULL);
|
---|
348 | ModelFetchData((void**)&model->nsteps,NULL,NULL,model_handle,"nsteps","Integer",NULL);
|
---|
349 | ModelFetchData((void**)&model->tolx,NULL,NULL,model_handle,"tolx","Scalar",NULL);
|
---|
350 | ModelFetchData((void**)&model->mincontrolconstraint,NULL,NULL,model_handle,"mincontrolconstraint","Scalar",NULL);
|
---|
351 | ModelFetchData((void**)&model->maxcontrolconstraint,NULL,NULL,model_handle,"maxcontrolconstraint","Scalar",NULL);
|
---|
352 | ModelFetchData((void**)&model->eps_rel,NULL,NULL,model_handle,"eps_rel","Scalar",NULL);
|
---|
353 | ModelFetchData((void**)&model->eps_abs,NULL,NULL,model_handle,"eps_abs","Scalar",NULL);
|
---|
354 | ModelFetchData((void**)&model->dt,NULL,NULL,model_handle,"dt","Scalar",NULL);
|
---|
355 | ModelFetchData((void**)&model->ndt,NULL,NULL,model_handle,"ndt","Scalar",NULL);
|
---|
356 | ModelFetchData((void**)&model->penalty_offset,NULL,NULL,model_handle,"penalty_offset","Scalar",NULL);
|
---|
357 | ModelFetchData((void**)&model->penalty_melting,NULL,NULL,model_handle,"penalty_melting","Scalar",NULL);
|
---|
358 | ModelFetchData((void**)&model->penalty_lock,NULL,NULL,model_handle,"penalty_lock","Integer",NULL);
|
---|
359 | ModelFetchData((void**)&model->sparsity,NULL,NULL,model_handle,"sparsity","Scalar",NULL);
|
---|
360 | ModelFetchData((void**)&model->connectivity,NULL,NULL,model_handle,"connectivity","Integer",NULL);
|
---|
361 | ModelFetchData((void**)&model->lowmem,NULL,NULL,model_handle,"lowmem","Integer",NULL);
|
---|
362 | ModelFetchData((void**)&model->solverstring,NULL,NULL,model_handle,"solverstring","String",NULL);
|
---|
363 | ModelFetchData((void**)&model->viscosity_overshoot,NULL,NULL,model_handle,"viscosity_overshoot","Scalar",NULL);
|
---|
364 | ModelFetchData((void**)&model->stokesreconditioning,NULL,NULL,model_handle,"stokesreconditioning","Scalar",NULL);
|
---|
365 | ModelFetchData((void**)&model->waitonlock,NULL,NULL,model_handle,"waitonlock","Integer",NULL);
|
---|
366 |
|
---|
367 | /*!Get thermal parameters: */
|
---|
368 | ModelFetchData((void**)&model->beta,NULL,NULL,model_handle,"beta","Scalar",NULL);
|
---|
369 | ModelFetchData((void**)&model->meltingpoint,NULL,NULL,model_handle,"meltingpoint","Scalar",NULL);
|
---|
370 | ModelFetchData((void**)&model->latentheat,NULL,NULL,model_handle,"latentheat","Scalar",NULL);
|
---|
371 | ModelFetchData((void**)&model->heatcapacity,NULL,NULL,model_handle,"heatcapacity","Scalar",NULL);
|
---|
372 | ModelFetchData((void**)&model->thermalconductivity,NULL,NULL,model_handle,"thermalconductivity","Scalar",NULL);
|
---|
373 | ModelFetchData((void**)&model->min_thermal_constraints,NULL,NULL,model_handle,"min_thermal_constraints","Integer",NULL);
|
---|
374 | ModelFetchData((void**)&model->mixed_layer_capacity,NULL,NULL,model_handle,"mixed_layer_capacity","Scalar",NULL);
|
---|
375 | ModelFetchData((void**)&model->thermal_exchange_velocity,NULL,NULL,model_handle,"thermal_exchange_velocity","Scalar",NULL);
|
---|
376 |
|
---|
377 | /*rifts: */
|
---|
378 | ModelFetchData((void**)&model->numrifts,NULL,NULL,model_handle,"numrifts","Integer",NULL);
|
---|
379 |
|
---|
380 | /*qmu: */
|
---|
381 | if(model->qmu_analysis){
|
---|
382 | ModelFetchData((void**)&model->numberofresponses,NULL,NULL,model_handle,"numberofresponses","Integer",NULL);
|
---|
383 | ModelFetchData((void**)&model->qmu_npart,NULL,NULL,model_handle,"npart","Integer",NULL);
|
---|
384 | }
|
---|
385 |
|
---|
386 | /*Assign output pointers: */
|
---|
387 | *pmodel=model;
|
---|
388 |
|
---|
389 | return 1;
|
---|
390 | }
|
---|
391 |
|
---|
392 | /*!--------------------------------------------------
|
---|
393 | ModelEcho
|
---|
394 | --------------------------------------------------*/
|
---|
395 | void ModelEcho(Model* model,int which_part,int rank) {
|
---|
396 |
|
---|
397 | //which_part determines what gets echoed, otherwise, we'll get too much output.
|
---|
398 | //1-> penalties
|
---|
399 |
|
---|
400 | int i,j;
|
---|
401 |
|
---|
402 | if(which_part==1 && my_rank==rank && (strcmp(model->meshtype,"3d")==0)){
|
---|
403 | printf("Model penalties: \n");
|
---|
404 | printf(" number of penalties: %i\n",model->numpenalties);
|
---|
405 | printf(" grids: \n");
|
---|
406 |
|
---|
407 | for(i=0;i<model->numpenalties;i++){
|
---|
408 | for(j=0;j<model->numlayers;j++){
|
---|
409 | printf("%i ",(int)*(model->penalties+model->numlayers*i+j));
|
---|
410 | }
|
---|
411 | printf("\n");
|
---|
412 | }
|
---|
413 | }
|
---|
414 |
|
---|
415 | if(which_part==2 && my_rank==rank){
|
---|
416 | printf("Model rifts: \n");
|
---|
417 | printf(" number of rifts: %i\n",model->numrifts);
|
---|
418 | for(i=0;i<model->numrifts;i++){
|
---|
419 | double* penaltypairs=model->riftspenaltypairs[i];
|
---|
420 | printf(" rift #%i\n",i);
|
---|
421 | for (j=0;j<model->riftsnumpenaltypairs[i];j++){
|
---|
422 | printf(" grids %g %g elements %g %g normal [%g,%g] length %g\n",*(penaltypairs+7*j+0),*(penaltypairs+7*j+1),*(penaltypairs+7*j+2),*(penaltypairs+7*j+3),
|
---|
423 | *(penaltypairs+7*j+4),*(penaltypairs+7*j+5),*(penaltypairs+7*j+6));
|
---|
424 | }
|
---|
425 | printf(" friction %g fill %i\n",model->riftsfriction[i],model->riftsfill[i]);
|
---|
426 | }
|
---|
427 | }
|
---|
428 | cleanup_and_return:
|
---|
429 | return;
|
---|
430 | }
|
---|