9.2
general documentation
fvm_interpolate.h
Go to the documentation of this file.
1#ifndef FVM_INTERPOLATE_H
2#define FVM_INTERPOLATE_H
3
4/*============================================================================
5 * Interpolate data defined on 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 * Interpolate vertex-based values to points located relative to a mesh.
57 *
58 * Least-squared based interpolation is used for now.
59 *
60 * parameters:
61 * this_nodal <-- pointer to nodal mesh representation structure
62 * entity_dim <-- 3 for location on cells, 2 for faces, 1 for edges,
63 * and 0 for vertices
64 * data_dim <-- data dimension
65 * n_points <-- number of points to locate
66 * location_id <-- id of element (with concatenated sections)
67 * in which each point is located
68 * point_coords <-- point coordinates
69 * src_data <-- source data (interleaved)
70 * dest_data <-> destination data (interleaved)
71 *----------------------------------------------------------------------------*/
72
73void
74fvm_interpolate_vtx_data(const fvm_nodal_t *this_nodal,
75 int entity_dim,
76 int data_dim,
77 cs_lnum_t n_points,
78 const cs_lnum_t location_id[],
79 const cs_coord_t point_coords[],
80 const cs_real_t src_data[],
81 cs_real_t dest_data[]);
82
83/*----------------------------------------------------------------------------*/
84
85#endif /* FVM_INTERPOLATE_H */
double cs_real_t
Floating-point value.
Definition: cs_defs.h:332
double cs_coord_t
Definition: cs_defs.h:330
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:325
void fvm_interpolate_vtx_data(const fvm_nodal_t *this_nodal, int entity_dim, int data_dim, cs_lnum_t n_points, const cs_lnum_t location_id[], const cs_coord_t point_coords[], const cs_real_t src_data[], cs_real_t dest_data[])
Definition: fvm_interpolate.cpp:105