Code_Saturne
CFD tool
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
fvm_nodal_append.h
Go to the documentation of this file.
1 #ifndef __FVM_NODAL_APPEND_H__
2 #define __FVM_NODAL_APPEND_H__
3 
4 /*============================================================================
5  * Append sections to a nodal representation associated with a mesh
6  *============================================================================*/
7 
8 /*
9  This file is part of Code_Saturne, a general-purpose CFD tool.
10 
11  Copyright (C) 1998-2012 EDF S.A.
12 
13  This program is free software; you can redistribute it and/or modify it under
14  the terms of the GNU General Public License as published by the Free Software
15  Foundation; either version 2 of the License, or (at your option) any later
16  version.
17 
18  This program is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
20  FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
21  details.
22 
23  You should have received a copy of the GNU General Public License along with
24  this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
25  Street, Fifth Floor, Boston, MA 02110-1301, USA.
26 */
27 
28 /*----------------------------------------------------------------------------*/
29 
30 /*----------------------------------------------------------------------------
31  * Local headers
32  *----------------------------------------------------------------------------*/
33 
34 #include "fvm_defs.h"
35 #include "fvm_nodal.h"
36 
37 /*----------------------------------------------------------------------------*/
38 
39 #ifdef __cplusplus
40 extern "C" {
41 #if 0
42 } /* Fake brace to force back Emacs auto-indentation back to column 0 */
43 #endif
44 #endif /* __cplusplus */
45 
46 /*=============================================================================
47  * Macro definitions
48  *============================================================================*/
49 
50 /*============================================================================
51  * Type definitions
52  *============================================================================*/
53 
54 /*=============================================================================
55  * Static global variables
56  *============================================================================*/
57 
58 /*=============================================================================
59  * Public function prototypes
60  *============================================================================*/
61 
62 /*----------------------------------------------------------------------------
63  * Append a new section to an existing fvm_nodal mesh, and transfer
64  * ownership of the given connectivity and optional parent number arrays to
65  * that section.
66  *
67  * parameters:
68  * this_nodal <-> nodal mesh structure
69  * n_elements <-- number of elements to add
70  * type <-- type of elements to add
71  * face_index <-- polyhedron -> faces index (O to n-1)
72  * size: n_elements + 1
73  * face_num <-- polyhedron -> face numbers (1 to n, signed,
74  * > 0 for outwards pointing face normal
75  * < 0 for inwards pointing face normal);
76  * size: face_index[n_elements]
77  * vertex_index <-- polygon face -> vertices index (O to n-1)
78  * size: face_index[n_elements]
79  * vertex_num <-- element -> vertex connectivity
80  * parent_element_num <-- element -> parent element number (1 to n) if non
81  * trivial (i.e. if element definitions correspond
82  * to a subset of the parent mesh), NULL otherwise
83  *----------------------------------------------------------------------------*/
84 
85 void
87  cs_lnum_t n_elements,
88  fvm_element_t type,
89  cs_lnum_t face_index[],
90  cs_lnum_t face_num[],
91  cs_lnum_t vertex_index[],
92  cs_lnum_t vertex_num[],
93  cs_lnum_t parent_element_num[]);
94 
95 /*----------------------------------------------------------------------------
96  * Append a new section to an existing fvm_nodal mesh, sharing the given
97  * given connectivity and optional parent number arrays with the caller.
98  *
99  * The caller should not destroy or modify the arrays passed to this
100  * function until the nodal mesh is destroyed.
101  *
102  * parameters:
103  * this_nodal <-> nodal mesh structure
104  * n_elements <-- number of elements to add
105  * type <-- type of elements to add
106  * face_index <-- polyhedron -> faces index (O to n-1)
107  * size: n_elements + 1
108  * face_num <-- polyhedron -> face numbers (1 to n, signed,
109  * > 0 for outwards pointing face normal
110  * < 0 for inwards pointing face normal);
111  * size: face_index[n_elements]
112  * vertex_index <-- polygon face -> vertices index (O to n-1)
113  * size: face_index[n_elements]
114  * vertex_num <-- element -> vertex connectivity
115  * parent_element_num <-- element -> parent element number (1 to n) if non
116  * trivial (i.e. if element definitions correspond
117  * to a subset of the parent mesh), NULL otherwise
118  *----------------------------------------------------------------------------*/
119 
120 void
122  cs_lnum_t n_elements,
123  fvm_element_t type,
124  cs_lnum_t face_index[],
125  cs_lnum_t face_num[],
126  cs_lnum_t vertex_index[],
127  cs_lnum_t vertex_num[],
128  cs_lnum_t parent_element_num[]);
129 
130 /*----------------------------------------------------------------------------*/
131 
132 #ifdef __cplusplus
133 }
134 #endif /* __cplusplus */
135 
136 #endif /* __FVM_NODAL_APPEND_H__ */
Definition: fvm_nodal_priv.h:152
void fvm_nodal_append_by_transfer(fvm_nodal_t *this_nodal, cs_lnum_t n_elements, fvm_element_t type, cs_lnum_t face_index[], cs_lnum_t face_num[], cs_lnum_t vertex_index[], cs_lnum_t vertex_num[], cs_lnum_t parent_element_num[])
Definition: fvm_nodal_append.c:265
fvm_element_t
Definition: fvm_defs.h:49
int cs_lnum_t
Definition: cs_defs.h:260
void fvm_nodal_append_shared(fvm_nodal_t *this_nodal, cs_lnum_t n_elements, fvm_element_t type, cs_lnum_t face_index[], cs_lnum_t face_num[], cs_lnum_t vertex_index[], cs_lnum_t vertex_num[], cs_lnum_t parent_element_num[])
Definition: fvm_nodal_append.c:340