7.0
general documentation
cs_medcoupling_intersector.h
Go to the documentation of this file.
1 #ifndef __CS_MEDCOUPLING_INTERSECTOR_HXX__
2 #define __CS_MEDCOUPLING_INTERSECTOR_HXX__
3 
4 /*============================================================================
5  * Interpolation using MEDCoupling Intersector.
6  *============================================================================*/
7 
8 /*
9  This file is part of Code_Saturne, a general-purpose CFD tool.
10 
11  Copyright (C) 1998-2021 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 /*----------------------------------------------------------------------------
31  * Local headers
32  *----------------------------------------------------------------------------*/
33 
34 #include "cs_defs.h"
35 #include "fvm_writer.h"
36 
37 /*----------------------------------------------------------------------------*/
38 
40 
41 /*============================================================================
42  * Structure definitions
43  *============================================================================*/
44 
45 typedef struct _cs_medcoupling_intersector_t cs_medcoupling_intersector_t;
46 
47 /*============================================================================
48  * Structure definitions
49  *============================================================================*/
50 
51 /*----------------------------------------------------------------------------*/
61 /*----------------------------------------------------------------------------*/
62 
63 void
64 cs_medcoupling_intersector_add(const char *name,
65  const char *medfile_path,
66  const char *interp_method,
67  const char *select_criteria);
68 
69 /*----------------------------------------------------------------------------*/
75 /*----------------------------------------------------------------------------*/
76 
77 void
78 cs_medcoupling_intersector_destroy(cs_medcoupling_intersector_t *mi);
79 
80 /*----------------------------------------------------------------------------*/
84 /*----------------------------------------------------------------------------*/
85 
86 void
88 
89 /*----------------------------------------------------------------------------*/
97 /*----------------------------------------------------------------------------*/
98 
99 cs_medcoupling_intersector_t *
101 
102 /*----------------------------------------------------------------------------*/
110 /*----------------------------------------------------------------------------*/
111 
112 cs_medcoupling_intersector_t *
113 cs_medcoupling_intersector_by_name(const char *name);
114 
115 /*----------------------------------------------------------------------------*/
124 /*----------------------------------------------------------------------------*/
125 
126 cs_real_t *
127 cs_medcoupling_intersect_volumes(cs_medcoupling_intersector_t *mi);
128 
129 /*----------------------------------------------------------------------------*/
136 /*----------------------------------------------------------------------------*/
137 
138 void
139 cs_medcoupling_intersector_translate(cs_medcoupling_intersector_t *mi,
140  cs_real_t translation[3]);
141 
142 /*----------------------------------------------------------------------------*/
152 /*----------------------------------------------------------------------------*/
153 
154 void
155 cs_medcoupling_intersector_rotate(cs_medcoupling_intersector_t *mi,
156  cs_real_t invariant[3],
157  cs_real_t axis[3],
158  cs_real_t angle);
159 
160 /*----------------------------------------------------------------------------*/
168 /*----------------------------------------------------------------------------*/
169 
170 void
171 cs_medcoupling_intersector_transform_from_init(cs_medcoupling_intersector_t *mi,
172  cs_real_t matrix[3][4]);
173 
174 /*----------------------------------------------------------------------------*/
181 /*----------------------------------------------------------------------------*/
182 
183 void
184 cs_medcoupling_intersector_dump_mesh(cs_medcoupling_intersector_t *mi,
185  const char *prefix);
186 
187 /*----------------------------------------------------------------------------*/
194 /*----------------------------------------------------------------------------*/
195 
196 void
197 cs_mi_post_init_writer(const char *case_name,
198  const char *dir_name,
199  const char *fmt_name,
200  const char *fmt_opts,
201  fvm_writer_time_dep_t time_dep,
202  bool output_at_start,
203  bool output_at_end,
204  int frequency_n,
205  double frequency_t);
206 
207 /*----------------------------------------------------------------------------*/
213 /*----------------------------------------------------------------------------*/
214 
215 void
216 cs_mi_post_add_mesh(cs_medcoupling_intersector_t *mi);
217 
219 
220 #endif /* __CS_MEDCOUPLING_INTERSECTOR_HXX__ */
cs_medcoupling_intersector_t * cs_medcoupling_intersector_by_id(int id)
Get a MEDCoupling intersector using its id.
Definition: cs_medcoupling_intersector.cxx:671
void cs_medcoupling_intersector_destroy_all(void)
Free all allocated intersectors.
Definition: cs_medcoupling_intersector.cxx:646
void cs_medcoupling_intersector_translate(cs_medcoupling_intersector_t *mi, cs_real_t translation[3])
translate the mesh using a given vector
Definition: cs_medcoupling_intersector.cxx:753
#define BEGIN_C_DECLS
Definition: cs_defs.h:495
void cs_medcoupling_intersector_add(const char *name, const char *medfile_path, const char *interp_method, const char *select_criteria)
Add a MEDCoupling intersector.
Definition: cs_medcoupling_intersector.cxx:583
void cs_medcoupling_intersector_rotate(cs_medcoupling_intersector_t *mi, cs_real_t invariant[3], cs_real_t axis[3], cs_real_t angle)
rotate the mesh
Definition: cs_medcoupling_intersector.cxx:810
fvm_writer_time_dep_t
Definition: fvm_writer.h:57
void cs_medcoupling_intersector_dump_mesh(cs_medcoupling_intersector_t *mi, const char *prefix)
translate the mesh using a given vector
Definition: cs_medcoupling_intersector.cxx:904
double cs_real_t
Floating-point value.
Definition: cs_defs.h:307
void matrix(const int *iconvp, const int *idiffp, const int *ndircp, const int *isym, const cs_real_t *thetap, const int *imucpp, const cs_real_t coefbp[], const cs_real_t cofbfp[], const cs_real_t rovsdt[], const cs_real_t i_massflux[], const cs_real_t b_massflux[], const cs_real_t i_visc[], const cs_real_t b_visc[], const cs_real_t xcpp[], cs_real_t da[], cs_real_t xa[])
Definition: cs_matrix_building.c:112
void cs_medcoupling_intersector_destroy(cs_medcoupling_intersector_t *mi)
Destroy a given MEDCoupling intersector.
Definition: cs_medcoupling_intersector.cxx:625
cs_medcoupling_intersector_t * cs_medcoupling_intersector_by_name(const char *name)
Get a MEDCoupling intersector by name.
Definition: cs_medcoupling_intersector.cxx:692
void cs_mi_post_add_mesh(cs_medcoupling_intersector_t *mi)
Associate a Medcoupling mesh to the default writer.
Definition: cs_medcoupling_intersector.cxx:971
void cs_mi_post_init_writer(const char *case_name, const char *dir_name, const char *fmt_name, const char *fmt_opts, fvm_writer_time_dep_t time_dep, bool output_at_start, bool output_at_end, int frequency_n, double frequency_t)
Create a new writer that will contains the boundary MED mesh added.
Definition: cs_medcoupling_intersector.cxx:928
void cs_medcoupling_intersector_transform_from_init(cs_medcoupling_intersector_t *mi, cs_real_t matrix[3][4])
Transform a mesh, but takes as input the initial position of the mesh.
Definition: cs_medcoupling_intersector.cxx:858
#define END_C_DECLS
Definition: cs_defs.h:496
cs_real_t * cs_medcoupling_intersect_volumes(cs_medcoupling_intersector_t *mi)
Compute the intersection volumes between the source mesh and code mesh.
Definition: cs_medcoupling_intersector.cxx:720