9.2
general documentation
cs_ext_neighborhood.h
Go to the documentation of this file.
1#ifndef CS_EXT_NEIGHBOR_H
2#define CS_EXT_NEIGHBOR_H
3
4/*============================================================================
5 * Extendend neighborhood hnalding and filtering.
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/*----------------------------------------------------------------------------
31 * Local headers
32 *----------------------------------------------------------------------------*/
33
34#include "base/cs_base.h"
35#include "mesh/cs_mesh.h"
37
38/*=============================================================================
39 * Local Macro definitions
40 *============================================================================*/
41
42/*============================================================================
43 * Type definition
44 *============================================================================*/
45
46/*----------------------------------------------------------------------------
47 * Extended neighborhood type
48 *----------------------------------------------------------------------------*/
49
50typedef enum {
51
52 CS_EXT_NEIGHBORHOOD_NONE, /* No extended neighborhood */
53 CS_EXT_NEIGHBORHOOD_COMPLETE, /* Full extended neighborhood */
54 CS_EXT_NEIGHBORHOOD_OPTIMIZED, /* Extended neighborhood
55 optimized through heuristics */
56 CS_EXT_NEIGHBORHOOD_CELL_CENTER_OPPOSITE, /* Cell centers best aligned
57 opposite to adjacent
58 cell centers */
59 CS_EXT_NEIGHBORHOOD_NON_ORTHO_MAX /* Cells adjacent to faces
60 whose non-orthogonality exceeds
61 a given threshold */
62
64
65/*============================================================================
66 * Global variables
67 *============================================================================*/
68
69/* Short names for extended neighborhood types */
70
71extern const char *cs_ext_neighborhood_type_name[];
72
73/*============================================================================
74 * Public function prototypes
75 *============================================================================*/
76
77/*----------------------------------------------------------------------------*/
83/*----------------------------------------------------------------------------*/
84
87
88/*----------------------------------------------------------------------------*/
94/*----------------------------------------------------------------------------*/
95
96void
98
99/*----------------------------------------------------------------------------*/
105/*----------------------------------------------------------------------------*/
106
107bool
109
110/*----------------------------------------------------------------------------*/
117/*----------------------------------------------------------------------------*/
118
119void
121
122/*----------------------------------------------------------------------------*/
129/*----------------------------------------------------------------------------*/
130
133
134/*----------------------------------------------------------------------------*/
141/*----------------------------------------------------------------------------*/
142
143void
145
146/*----------------------------------------------------------------------------*/
157/*----------------------------------------------------------------------------*/
158
159void
161 cs_mesh_quantities_t *mesh_quantities);
162
163/*----------------------------------------------------------------------------*/
169/*----------------------------------------------------------------------------*/
170
171void
173
174/*----------------------------------------------------------------------------*/
175
176#endif /* CS_EXT_NEIGHBOR_H */
double cs_real_t
Floating-point value.
Definition: cs_defs.h:332
cs_ext_neighborhood_type_t
Definition: cs_ext_neighborhood.h:50
@ CS_EXT_NEIGHBORHOOD_OPTIMIZED
Definition: cs_ext_neighborhood.h:54
@ CS_EXT_NEIGHBORHOOD_NON_ORTHO_MAX
Definition: cs_ext_neighborhood.h:59
@ CS_EXT_NEIGHBORHOOD_COMPLETE
Definition: cs_ext_neighborhood.h:53
@ CS_EXT_NEIGHBORHOOD_CELL_CENTER_OPPOSITE
Definition: cs_ext_neighborhood.h:56
@ CS_EXT_NEIGHBORHOOD_NONE
Definition: cs_ext_neighborhood.h:52
cs_ext_neighborhood_type_t cs_ext_neighborhood_get_type(void)
Get the extended neighborhood type.
Definition: cs_ext_neighborhood.cpp:1995
const char * cs_ext_neighborhood_type_name[]
void cs_ext_neighborhood_set_non_ortho_max(cs_real_t non_ortho_max)
Set the non_orthogonality threshold (in degrees) associated with the CS_EXT_NEIGHBORHOOD_NON_ORTHO_MA...
Definition: cs_ext_neighborhood.cpp:2072
void cs_ext_neighborhood_set_boundary_complete(bool keep)
Set the extended neighborhood type.
Definition: cs_ext_neighborhood.cpp:2042
cs_real_t cs_ext_neighborhood_get_non_ortho_max(void)
Get the non_orthogonality threshold (in degrees) associated with the CS_EXT_NEIGHBORHOOD_NON_ORTHO_MA...
Definition: cs_ext_neighborhood.cpp:2057
void cs_ext_neighborhood_set_type(cs_ext_neighborhood_type_t enh_type)
Set the extended neighborhood type.
Definition: cs_ext_neighborhood.cpp:2009
void cs_ext_neighborhood_define(cs_mesh_t *mesh)
Create the "cell -> cells" connectivity.
Definition: cs_ext_neighborhood.cpp:2248
bool cs_ext_neighborhood_get_boundary_complete(void)
Query whether full extended neighborhood should be kept at boundaries.
Definition: cs_ext_neighborhood.cpp:2027
void cs_ext_neighborhood_reduce(cs_mesh_t *mesh, cs_mesh_quantities_t *mesh_quantities)
Reduce the "cell -> cells" connectivity for the extended neighborhood using a non-orthogonality crite...
Definition: cs_ext_neighborhood.cpp:2091
Definition: mesh.f90:26
Definition: cs_mesh_quantities.h:88
Definition: cs_mesh.h:85