8.3
general documentation
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
cs_enforcement.h
Go to the documentation of this file.
1#ifndef __CS_ENFORCEMENT_H__
2#define __CS_ENFORCEMENT_H__
3
4/*============================================================================
5 * Manage the list of solid cells and associated helper functions
6 *============================================================================*/
7
8/*
9 This file is part of code_saturne, a general-purpose CFD tool.
10
11 Copyright (C) 1998-2024 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 * Local headers
30 *----------------------------------------------------------------------------*/
31
32#include "cs_defs.h"
33#include "cs_cdo_connect.h"
34#include "cs_cdo_local.h"
35
36/*----------------------------------------------------------------------------*/
37
39
40/*============================================================================
41 * Macro definitions
42 *============================================================================*/
43
44/*=============================================================================
45 * Structure and type definitions
46 *============================================================================*/
47
63typedef enum {
64
71
72
77typedef enum {
78
83
84
89typedef struct {
90
93
96 int stride;
100
101/*============================================================================
102 * Public function prototypes
103 *============================================================================*/
104
105/*----------------------------------------------------------------------------*/
118/*----------------------------------------------------------------------------*/
119
123 int stride,
124 cs_lnum_t n_elts,
125 const cs_lnum_t *elt_ids,
126 const cs_real_t *values);
127
128/*----------------------------------------------------------------------------*/
140/*----------------------------------------------------------------------------*/
141
142void
146 int stride,
147 cs_lnum_t n_elts,
148 const cs_lnum_t *elt_ids,
149 const cs_real_t *values);
150
151/*----------------------------------------------------------------------------*/
159/*----------------------------------------------------------------------------*/
160
163
164/*----------------------------------------------------------------------------*/
170/*----------------------------------------------------------------------------*/
171
172void
174
175/*----------------------------------------------------------------------------*/
182/*----------------------------------------------------------------------------*/
183
184void
185cs_enforcement_param_log(const char *eqname,
186 const cs_enforcement_param_t *efp);
187
188/*----------------------------------------------------------------------------*/
198/*----------------------------------------------------------------------------*/
199
200cs_real_t *
202 int n_params,
203 cs_enforcement_param_t **efp_array);
204
205/*----------------------------------------------------------------------------*/
215/*----------------------------------------------------------------------------*/
216
217cs_real_t *
219 int n_params,
220 cs_enforcement_param_t **efp_array);
221
222/*----------------------------------------------------------------------------*/
232/*----------------------------------------------------------------------------*/
233
234cs_real_t *
236 int n_params,
237 cs_enforcement_param_t **efp_array);
238
239/*----------------------------------------------------------------------------*/
249/*----------------------------------------------------------------------------*/
250
251bool
252cs_enforcement_dofs_cw(const cs_real_t *forced_values,
253 cs_cell_sys_t *csys,
254 cs_real_t *cw_forced_values);
255
256/*----------------------------------------------------------------------------*/
257
259
260#endif /* __CS_ENFORCEMENT_H__ */
#define BEGIN_C_DECLS
Definition: cs_defs.h:542
double cs_real_t
Floating-point value.
Definition: cs_defs.h:342
#define END_C_DECLS
Definition: cs_defs.h:543
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:335
cs_real_t * cs_enforcement_define_at_faces(const cs_cdo_connect_t *connect, int n_params, cs_enforcement_param_t **efp_array)
Build a cs_enforcement_t structure for face-based scheme.
Definition: cs_enforcement.cpp:500
void cs_enforcement_param_log(const char *eqname, const cs_enforcement_param_t *efp)
Log a cs_enforcement_param_t structure.
Definition: cs_enforcement.cpp:281
cs_enforcement_selection_t
Type of entities used to define the selection where the enforcement takes place.
Definition: cs_enforcement.h:63
@ CS_ENFORCEMENT_SELECTION_VERTICES
Definition: cs_enforcement.h:68
@ CS_ENFORCEMENT_SELECTION_EDGES
Definition: cs_enforcement.h:67
@ CS_ENFORCEMENT_SELECTION_CELLS
Definition: cs_enforcement.h:65
@ CS_ENFORCEMENT_SELECTION_FACES
Definition: cs_enforcement.h:66
cs_real_t * cs_enforcement_define_at_edges(const cs_cdo_connect_t *connect, int n_params, cs_enforcement_param_t **efp_array)
Build a cs_enforcement_t structure for edge-based scheme.
Definition: cs_enforcement.cpp:629
cs_enforcement_param_t * cs_enforcement_param_create(cs_enforcement_selection_t sel_type, cs_enforcement_type_t type, int stride, cs_lnum_t n_elts, const cs_lnum_t *elt_ids, const cs_real_t *values)
Create and define a cs_enforcement_param_t structure.
Definition: cs_enforcement.cpp:111
void cs_enforcement_param_free(cs_enforcement_param_t **p_efp)
Free a cs_enforcement_param_t structure.
Definition: cs_enforcement.cpp:254
void cs_enforcement_param_reset(cs_enforcement_param_t *efp, cs_enforcement_selection_t sel_type, cs_enforcement_type_t type, int stride, cs_lnum_t n_elts, const cs_lnum_t *elt_ids, const cs_real_t *values)
Reset an existing cs_enforcement_param_t structure.
Definition: cs_enforcement.cpp:172
cs_enforcement_param_t * cs_enforcement_param_copy(const cs_enforcement_param_t *ref)
Copy a cs_enforcement_param_t structure.
Definition: cs_enforcement.cpp:228
cs_enforcement_type_t
Describe the way the values to enforce are defined.
Definition: cs_enforcement.h:77
@ CS_ENFORCEMENT_BY_DOF_VALUES
Definition: cs_enforcement.h:80
@ CS_ENFORCEMENT_BY_CONSTANT
Definition: cs_enforcement.h:79
cs_real_t * cs_enforcement_define_at_vertices(const cs_cdo_connect_t *connect, int n_params, cs_enforcement_param_t **efp_array)
Build a cs_enforcement_t structure for vertex-based scheme.
Definition: cs_enforcement.cpp:371
bool cs_enforcement_dofs_cw(const cs_real_t *forced_values, cs_cell_sys_t *csys, cs_real_t *cw_forced_values)
Build the cell-wise value to enforce.
Definition: cs_enforcement.cpp:758
Definition: cs_cdo_connect.h:61
Set of arrays and local (small) dense matrices related to a mesh cell This is a key structure for bui...
Definition: cs_cdo_local.h:147
Set of data defining an enforcement.
Definition: cs_enforcement.h:89
int stride
Definition: cs_enforcement.h:96
cs_enforcement_type_t type
Definition: cs_enforcement.h:92
cs_real_t * values
Definition: cs_enforcement.h:97
cs_lnum_t n_elts
Definition: cs_enforcement.h:94
cs_enforcement_selection_t selection_type
Definition: cs_enforcement.h:91
cs_lnum_t * elt_ids
Definition: cs_enforcement.h:95