programmer's documentation
fvm_point_location.h
Go to the documentation of this file.
1 #ifndef __FVM_POINT_LOCATION_H__
2 #define __FVM_POINT_LOCATION_H__
3 
4 /*============================================================================
5  * Locate local points in 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-2015 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 "cs_defs.h"
31 
32 /*----------------------------------------------------------------------------
33  * Local headers
34  *----------------------------------------------------------------------------*/
35 
36 #include "fvm_defs.h"
37 #include "fvm_nodal.h"
38 
39 /*----------------------------------------------------------------------------*/
40 
42 
43 /*=============================================================================
44  * Macro definitions
45  *============================================================================*/
46 
47 /*============================================================================
48  * Type definitions
49  *============================================================================*/
50 
51 /*=============================================================================
52  * Static global variables
53  *============================================================================*/
54 
55 /*=============================================================================
56  * Public function prototypes
57  *============================================================================*/
58 
59 /*----------------------------------------------------------------------------
60  * Find elements in a given nodal mesh containing points: updates the
61  * location[] and distance[] arrays associated with a set of points
62  * for points that are in an element of this mesh, or closer to one
63  * than to previously encountered elements.
64  *
65  * parameters:
66  * this_nodal <-- pointer to nodal mesh representation structure
67  * tolerance_base <-- associated base tolerance (used for bounding
68  * box check only, not for location test)
69  * tolerance_multiplier <-- associated fraction of element bounding boxes
70  * added to tolerance
71  * locate_on_parents <-- location relative to parent element numbers if 1,
72  * id of element + 1 in concatenated sections of
73  * same element dimension if 0
74  * n_points <-- number of points to locate
75  * point_tag <-- optional point tag
76  * point_coords <-- point coordinates
77  * location <-> number of element containing or closest to each
78  * point (size: n_points)
79  * distance <-> distance from point to element indicated by
80  * location[]: < 0 if unlocated, 0 - 1 if inside,
81  * and > 1 if outside a volume element, or absolute
82  * distance to a surface element (size: n_points)
83  *----------------------------------------------------------------------------*/
84 
85 void
86 fvm_point_location_nodal(const fvm_nodal_t *this_nodal,
87  float tolerance_base,
88  float tolerance_fraction,
89  int locate_on_parents,
90  cs_lnum_t n_points,
91  const cs_lnum_t *point_tag,
92  const cs_coord_t point_coords[],
93  cs_lnum_t location[],
94  float distance[]);
95 
96 /*----------------------------------------------------------------------------*/
97 
99 
100 #endif /* __FVM_POINT_LOCATION_H__ */
#define BEGIN_C_DECLS
Definition: cs_defs.h:429
void fvm_point_location_nodal(const fvm_nodal_t *this_nodal, float tolerance_base, float tolerance_fraction, int locate_on_parents, cs_lnum_t n_points, const cs_lnum_t *point_tag, const cs_coord_t point_coords[], cs_lnum_t location[], float distance[])
Definition: fvm_point_location.c:3253
double cs_coord_t
Definition: cs_defs.h:293
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:292
#define END_C_DECLS
Definition: cs_defs.h:430