1
#ifndef __FVM_POINT_LOCATION_H__
2
#define __FVM_POINT_LOCATION_H__
4
/*============================================================================
5
* Locate local points in a nodal representation associated with a mesh
6
*============================================================================*/
9
This file is part of Code_Saturne, a general-purpose CFD tool.
11
Copyright (C) 1998-2011 EDF S.A.
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
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
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.
28
/*----------------------------------------------------------------------------*/
30
/*----------------------------------------------------------------------------
32
*----------------------------------------------------------------------------*/
35
#include "fvm_nodal.h"
37
/*----------------------------------------------------------------------------*/
42
} /* Fake brace to force back Emacs auto-indentation back to column 0 */
44
#endif /* __cplusplus */
46
/*=============================================================================
48
*============================================================================*/
50
/*============================================================================
52
*============================================================================*/
54
/*=============================================================================
55
* Static global variables
56
*============================================================================*/
58
/*=============================================================================
59
* Public function prototypes
60
*============================================================================*/
62
/*----------------------------------------------------------------------------
63
* Find elements in a given nodal mesh containing points: updates the
64
* location[] and distance[] arrays associated with a set of points
65
* for points that are in an element of this mesh, or closer to one
66
* than to previously encountered elements.
69
* this_nodal <-- pointer to nodal mesh representation structure
70
* tolerance <-- associated 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_coords <-- point coordinates
76
* location <-> number of element containing or closest to each
77
* point (size: n_points)
78
* distance <-> distance from point to element indicated by
79
* location[]: < 0 if unlocated, 0 - 1 if inside,
80
* and > 1 if outside a volume element, or absolute
81
* distance to a surface element (size: n_points)
82
*----------------------------------------------------------------------------*/
85
fvm_point_location_nodal(const fvm_nodal_t *this_nodal,
87
int locate_on_parents,
89
const fvm_coord_t point_coords[],
90
fvm_lnum_t location[],
93
/*----------------------------------------------------------------------------
94
* Find elements in a given nodal mesh closest to points: updates the
95
* location[] and distance[] arrays associated with a set of points
96
* for points that are closer to an element of this mesh than to previously
97
* encountered elements.
99
* This function currently only handles elements of lower dimension than
100
* the spatial dimension.
103
* this_nodal <-- pointer to nodal mesh representation structure
104
* locate_on_parents <-- location relative to parent element numbers if 1,
105
* id of element + 1 in concatenated sections of
106
* same element dimension if 0
107
* n_points <-- number of points to locate
108
* point_coords <-- point coordinates
109
* location <-> number of element containing or closest to each
110
* point (size: n_points)
111
* distance <-> distance from point to element indicated by
112
* location[]: < 0 if unlocated, or absolute
113
* distance to a surface element (size: n_points)
114
*----------------------------------------------------------------------------*/
117
fvm_point_location_closest_nodal(const fvm_nodal_t *this_nodal,
118
int locate_on_parents,
120
const fvm_coord_t point_coords[],
121
fvm_lnum_t location[],
124
/*----------------------------------------------------------------------------*/
128
#endif /* __cplusplus */
130
#endif /* __FVM_POINT_LOCATION_H__ */