1
1
/*============================================================================
3
* This file is part of the Code_Saturne Kernel, element of the
4
* Code_Saturne CFD tool.
6
* Copyright (C) 1998-2009 EDF S.A., France
8
* contact: saturne-support@edf.fr
10
* The Code_Saturne Kernel is free software; you can redistribute it
11
* and/or modify it under the terms of the GNU General Public License
12
* as published by the Free Software Foundation; either version 2 of
13
* the License, or (at your option) any later version.
15
* The Code_Saturne Kernel is distributed in the hope that it will be
16
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty
17
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
* GNU General Public License for more details.
20
* You should have received a copy of the GNU General Public License
21
* along with the Code_Saturne Kernel; if not, write to the
22
* Free Software Foundation, Inc.,
23
* 51 Franklin St, Fifth Floor,
24
* Boston, MA 02110-1301 USA
26
*============================================================================*/
28
/*============================================================================
29
2
* Code_Aster coupling
30
3
*============================================================================*/
6
This file is part of Code_Saturne, a general-purpose CFD tool.
8
Copyright (C) 1998-2011 EDF S.A.
10
This program is free software; you can redistribute it and/or modify it under
11
the terms of the GNU General Public License as published by the Free Software
12
Foundation; either version 2 of the License, or (at your option) any later
15
This program is distributed in the hope that it will be useful, but WITHOUT
16
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
20
You should have received a copy of the GNU General Public License along with
21
this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
22
Street, Fifth Floor, Boston, MA 02110-1301, USA.
25
/*----------------------------------------------------------------------------*/
32
27
#if defined(HAVE_CONFIG_H)
33
28
#include "cs_config.h"
242
238
geom[1] = n_nodes;
244
240
cs_calcium_write_int(comp_id, time_dep, cur_time, 0,
245
"dongeo", 2, &(geom[0]));
241
"DONGEO", 2, &(geom[0]));
249
245
cs_calcium_write_double(comp_id, time_dep, cur_time, 0,
252
cs_calcium_write_double(comp_id, time_dep, cur_time, 0,
253
"coofac", 3*n_faces,&(faces_coords[0]));
255
cs_calcium_write_double(comp_id, time_dep, cur_time, 0,
256
"coonod", 3*n_nodes,&(nodes_coords[0]));
258
cs_calcium_write_int(comp_id, time_dep, cur_time, 0,
259
"colfac", n_faces, &(faces_color[0]));
261
cs_calcium_write_int(comp_id, time_dep, cur_time, 0,
262
"colnod", n_nodes, &(nodes_color[0]));
248
cs_calcium_write_double(comp_id, time_dep, cur_time, 0,
249
"COOFAC", 3*n_faces,&(faces_coords[0]));
251
cs_calcium_write_double(comp_id, time_dep, cur_time, 0,
252
"COONOD", 3*n_nodes,&(nodes_coords[0]));
254
cs_calcium_write_int(comp_id, time_dep, cur_time, 0,
255
"COLFAC", n_faces, &(faces_color[0]));
257
cs_calcium_write_int(comp_id, time_dep, cur_time, 0,
258
"COLNOD", n_nodes, &(nodes_color[0]));
478
473
/* commande reception nb iterations */
479
474
cs_calcium_read_int(comp_id, time_dep, &min_time, &max_time,
481
"nbpdtm", 1, &n_val_read, nbpdt);
476
"NBPDTM", 1, &n_val_read, nbpdt);
482
477
/* commande reception nb sous-it. */
483
478
cs_calcium_read_int(comp_id, time_dep, &min_time, &max_time,
485
"nbssit",1,&n_val_read, nbsspdt);
480
"NBSSIT",1,&n_val_read, nbsspdt);
486
481
/* commande reception de la variable epsilo */
487
482
cs_calcium_read_double(comp_id, time_dep, &min_time, &max_time,
489
"epsilo",1,&n_val_read, delta);
490
/* commande reception de la variable isyncp */
491
cs_calcium_read_int(comp_id, time_dep, &min_time, &max_time,
493
"isyncp",1,&n_val_read, ihi);
494
/* commande reception de la variable ntchr */
495
cs_calcium_read_int(comp_id, time_dep, &min_time, &max_time,
497
"ntchro",1,&n_val_read, chro);
484
"EPSILO",1,&n_val_read, delta);
498
485
/* commande reception de la variable ttinit */
499
486
cs_calcium_read_double(comp_id, time_dep, &min_time, &max_time,
501
"ttinit",1,&n_val_read, &ttanc);
488
"TTINIT",1,&n_val_read, &ttanc);
502
489
/* commande reception de la variable dtref */
503
490
cs_calcium_read_double(comp_id, time_dep, &min_time, &max_time,
505
"pdtref",1,&n_val_read, dt);
492
"PDTREF",1,&n_val_read, dt);
507
494
if (fabs(*tt - ttanc) > 1.e-16)
508
495
bft_error(__FILE__, __LINE__, 0,
517
504
MPI_Bcast(nbpdt, 1, CS_MPI_INT, 0, cs_glob_mpi_comm);
518
505
MPI_Bcast(nbsspdt, 1, CS_MPI_INT, 0, cs_glob_mpi_comm);
519
MPI_Bcast(ihi, 1, CS_MPI_INT, 0, cs_glob_mpi_comm);
520
MPI_Bcast(chro, 1, CS_MPI_INT, 0, cs_glob_mpi_comm);
521
506
MPI_Bcast(delta, 1, CS_MPI_REAL, 0, cs_glob_mpi_comm);
522
507
MPI_Bcast(dt, 1, CS_MPI_REAL, 0, cs_glob_mpi_comm);
574
557
/* Send time step (calculated in "ddtvar" Subroutine) to'Milieu'*/
575
558
cs_calcium_write_double(comp_id, time_dep, 0.0, *nbpdt,
578
561
/* Receive time step sent by 'Milieu' */
579
562
cs_calcium_read_double(comp_id, time_dep, &min_time, &max_time,
581
"dtcalc", 1, &n_val_read, &(dtloc));
564
"DTCALC", 1, &n_val_read, &(dtloc));
583
566
assert(n_val_read == 1);