programmer's documentation
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
src
fvm
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-2013 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
41
BEGIN_C_DECLS
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 <-- associated tolerance
68
* locate_on_parents <-- location relative to parent element numbers if 1,
69
* id of element + 1 in concatenated sections of
70
* same element dimension if 0
71
* n_points <-- number of points to locate
72
* point_coords <-- point coordinates
73
* location <-> number of element containing or closest to each
74
* point (size: n_points)
75
* distance <-> distance from point to element indicated by
76
* location[]: < 0 if unlocated, 0 - 1 if inside,
77
* and > 1 if outside a volume element, or absolute
78
* distance to a surface element (size: n_points)
79
*----------------------------------------------------------------------------*/
80
81
void
82
fvm_point_location_nodal
(
const
fvm_nodal_t *this_nodal,
83
double
tolerance,
84
int
locate_on_parents,
85
cs_lnum_t
n_points,
86
const
cs_coord_t
point_coords[],
87
cs_lnum_t
location[],
88
float
distance[]);
89
90
/*----------------------------------------------------------------------------
91
* Find elements in a given nodal mesh closest to points: updates the
92
* location[] and distance[] arrays associated with a set of points
93
* for points that are closer to an element of this mesh than to previously
94
* encountered elements.
95
*
96
* This function currently only handles elements of lower dimension than
97
* the spatial dimension.
98
*
99
* parameters:
100
* this_nodal <-- pointer to nodal mesh representation structure
101
* locate_on_parents <-- location relative to parent element numbers if 1,
102
* id of element + 1 in concatenated sections of
103
* same element dimension if 0
104
* n_points <-- number of points to locate
105
* point_coords <-- point coordinates
106
* location <-> number of element containing or closest to each
107
* point (size: n_points)
108
* distance <-> distance from point to element indicated by
109
* location[]: < 0 if unlocated, or absolute
110
* distance to a surface element (size: n_points)
111
*----------------------------------------------------------------------------*/
112
113
void
114
fvm_point_location_closest_nodal
(
const
fvm_nodal_t *this_nodal,
115
int
locate_on_parents,
116
cs_lnum_t
n_points,
117
const
cs_coord_t
point_coords[],
118
cs_lnum_t
location[],
119
float
distance[]);
120
121
/*----------------------------------------------------------------------------*/
122
123
END_C_DECLS
124
125
#endif
/* __FVM_POINT_LOCATION_H__ */
Generated on Thu Feb 27 2014 19:21:34 by
1.8.3.1