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
#ifndef __CS_MESH_CONNECT_H__
29
#define __CS_MESH_CONNECT_H__
31
/*============================================================================
32
* Extract nodal connectivity mesh representations from a native mesh.
33
*============================================================================*/
35
/*----------------------------------------------------------------------------
37
*----------------------------------------------------------------------------*/
39
#include "fvm_nodal.h"
41
/*----------------------------------------------------------------------------
43
*----------------------------------------------------------------------------*/
48
/*----------------------------------------------------------------------------*/
52
/*=============================================================================
54
*============================================================================*/
56
/*============================================================================
58
*============================================================================*/
60
/*============================================================================
61
* Static global variables
62
*============================================================================*/
64
/*=============================================================================
65
* Public function prototypes
66
*============================================================================*/
68
/*----------------------------------------------------------------------------
69
* Extract a mesh's "cells -> faces" connectivity.
71
* We consider a common numbering for internal and boundary faces, in which
72
* boundary faces are defined first. The common id for the i-th boundary
73
* face is thus i, and that of the j-th interior face is n_b_faces + j.
75
* If ind_cel_extr != NULL, then:
76
* --- ind_cel_extr[cell_id] = id in the list to extract (0 to n-1)
77
* if cell cell_id should be extracted
78
* --- ind_cel_extr[cell_id] = -1 if cells cell_id should be ignored
81
* mesh <-- pointer to mesh structure
82
* extr_cell_size <-- size of extr_cell_id[] array
83
* extr_cell_id <-- extr_cell_id = ids of extracted cells, or -1
84
* p_cell_faces_idx --> cells -> faces index
85
* p_cell_faces_val --> cells -> faces connectivity
86
*----------------------------------------------------------------------------*/
89
cs_mesh_connect_get_cell_faces(const cs_mesh_t *mesh,
90
fvm_lnum_t extr_cell_size,
91
const fvm_lnum_t extr_cell_id[],
92
fvm_lnum_t * *const p_cell_faces_idx,
93
fvm_lnum_t * *const p_cell_faces_val);
95
/*----------------------------------------------------------------------------
96
* Build a nodal connectivity structure from a subset of a mesh's cells.
98
* The list of cells to extract is optional (if none is given, all cells
99
* faces are extracted by default); it does not need to be ordered on input,
100
* but is always ordered on exit (as cells are extracted by increasing number
101
* traversal, the list is reordered to ensure the coherency of the extracted
102
* mesh's link to its parent cells, built using this list).
106
* name <-- extracted mesh name
107
* cell_list_size <-- size of cell_list[] array
108
* cell_list <-> list of cells (1 to n), or NULL
111
* pointer to extracted nodal mesh
112
*----------------------------------------------------------------------------*/
115
cs_mesh_connect_cells_to_nodal(const cs_mesh_t *mesh,
117
fvm_lnum_t cell_list_size,
118
fvm_lnum_t cell_list[]);
120
/*----------------------------------------------------------------------------
121
* Build a nodal connectivity structure from a subset of a mesh's faces.
123
* The lists of faces to extract are optional (if none is given, boundary
124
* faces are extracted by default); they do not need to be ordered on input,
125
* but they are always ordered on exit (as faces are extracted by increasing
126
* number traversal, the lists are reordered to ensure the coherency of
127
* the extracted mesh's link to its parent faces, built using these lists).
131
* name <-- extracted mesh name
132
* i_face_list_size <-- size of i_face_list[] array
133
* b_face_list_size <-- size of b_face_list[] array
134
* i_face_list <-> list of interior faces (1 to n), or NULL
135
* b_face_list <-> list of boundary faces (1 to n), or NULL
138
* pointer to extracted nodal mesh
139
*----------------------------------------------------------------------------*/
142
cs_mesh_connect_faces_to_nodal(const cs_mesh_t *mesh,
144
fvm_lnum_t i_face_list_size,
145
fvm_lnum_t b_face_list_size,
146
fvm_lnum_t i_face_list[],
147
fvm_lnum_t b_face_list[]);
149
/*----------------------------------------------------------------------------*/
153
#endif /* __CS_MESH_CONNECT_H__ */