9.2
general documentation
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-2026 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#include "base/cs_defs.h"
31
32/*----------------------------------------------------------------------------
33 * Local headers
34 *----------------------------------------------------------------------------*/
35
36#include "fvm/fvm_defs.h"
37#include "fvm/fvm_nodal.h"
38
39/*=============================================================================
40 * Macro definitions
41 *============================================================================*/
42
43/*============================================================================
44 * Type definitions
45 *============================================================================*/
46
47/*=============================================================================
48 * Static global variables
49 *============================================================================*/
50
51/*=============================================================================
52 * Public function prototypes
53 *============================================================================*/
54
55/*----------------------------------------------------------------------------
56 * Append a new section to an existing fvm_nodal mesh, and transfer
57 * ownership of the given connectivity and optional parent number arrays to
58 * that section.
59 *
60 * parameters:
61 * this_nodal <-> nodal mesh structure
62 * n_elements <-- number of elements to add
63 * type <-- type of elements to add
64 * face_index <-- polyhedron -> faces index (O to n-1)
65 * size: n_elements + 1
66 * face_num <-- polyhedron -> face numbers (1 to n, signed,
67 * > 0 for outwards pointing face normal
68 * < 0 for inwards pointing face normal);
69 * size: face_index[n_elements]
70 * vertex_index <-- polygon face -> vertices index (O to n-1)
71 * size: face_index[n_elements]
72 * vertex_num <-- element -> vertex connectivity
73 * parent_element_id <-- element -> parent element id (0 to n-1) if non
74 * trivial (i.e. if element definitions correspond
75 * to a subset of the parent mesh), NULL otherwise
76 *----------------------------------------------------------------------------*/
77
78void
79fvm_nodal_append_by_transfer(fvm_nodal_t *this_nodal,
80 cs_lnum_t n_elements,
81 fvm_element_t type,
82 cs_lnum_t face_index[],
83 cs_lnum_t face_num[],
84 cs_lnum_t vertex_index[],
85 cs_lnum_t vertex_num[],
86 cs_lnum_t parent_element_id[]);
87
88/*----------------------------------------------------------------------------
89 * Append a new section to an existing fvm_nodal mesh, sharing the given
90 * given connectivity and optional parent number arrays with the caller.
91 *
92 * The caller should not destroy or modify the arrays passed to this
93 * function until the nodal mesh is destroyed.
94 *
95 * parameters:
96 * this_nodal <-> nodal mesh structure
97 * n_elements <-- number of elements to add
98 * type <-- type of elements to add
99 * face_index <-- polyhedron -> faces index (O to n-1)
100 * size: n_elements + 1
101 * face_num <-- polyhedron -> face numbers (1 to n, signed,
102 * > 0 for outwards pointing face normal
103 * < 0 for inwards pointing face normal);
104 * size: face_index[n_elements]
105 * vertex_index <-- polygon face -> vertices index (O to n-1)
106 * size: face_index[n_elements]
107 * vertex_num <-- element -> vertex connectivity
108 * parent_element_id <-- element -> parent element id (0 to n-1) if non
109 * trivial (i.e. if element definitions correspond
110 * to a subset of the parent mesh), NULL otherwise
111 *----------------------------------------------------------------------------*/
112
113void
114fvm_nodal_append_shared(fvm_nodal_t *this_nodal,
115 cs_lnum_t n_elements,
116 fvm_element_t type,
117 cs_lnum_t face_index[],
118 cs_lnum_t face_num[],
119 cs_lnum_t vertex_index[],
120 cs_lnum_t vertex_num[],
121 cs_lnum_t parent_element_id[]);
122
123/*----------------------------------------------------------------------------*/
124
125#endif /* FVM_NODAL_APPEND_H */
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:325
fvm_element_t
Definition: fvm_defs.h:44
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_id[])
Definition: fvm_nodal_append.cpp:333
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_id[])
Definition: fvm_nodal_append.cpp:258