#include <stdarg.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <assert.h>#include <math.h>#include "bft_error.h"#include "bft_mem.h"#include "bft_printf.h"#include "cs_file.h"#include "cs_mesh.h"#include "cs_mesh_connect.h"#include "cs_parall.h"#include "cs_post.h"#include "cs_prototypes.h"#include "cs_rotation.h"#include "cs_selector.h"#include "cs_timer.h"#include "fvm_writer.h"#include "fvm_nodal.h"#include "fvm_nodal_append.h"#include "cs_medcoupling_utils.hxx"#include "cs_medcoupling_intersector.h"#include <MEDCoupling_version.h>#include <MEDFileMesh.hxx>#include <MEDCouplingUMesh.hxx>#include <MEDFileField1TS.hxx>#include <MEDCouplingField.hxx>#include <MEDCouplingFieldFloat.hxx>#include <MEDCouplingFieldDouble.hxx>#include <MEDFileFieldMultiTS.hxx>#include <MEDCouplingRemapper.hxx>#include <MEDLoader.hxx>#include <MEDCouplingNormalizedUnstructuredMesh.txx>#include "Interpolation3D.hxx"
Include dependency graph for cs_medcoupling_intersector.cxx:Functions | |
| void | _allocate_intersector (cs_medcoupling_intersector_t *mi, const char *name, const char *medfile_path, const char *interp_method, const char *select_criteria) |
| Initialize a cs_medcoupling_intersector with given parameters. More... | |
| void | _destroy_intersector (cs_medcoupling_intersector_t *mi) |
| destroy a given intersector More... | |
| void | _compute_intersection_volumes (cs_medcoupling_intersector_t *mi) |
| Compute intersection matrix and update the intersection array. More... | |
| void | _dump_medcoupling_mesh (MEDCouplingUMesh *m, const char *prefix, const char *filename) |
| dump a medcoupling mesh More... | |
| void | cs_medcoupling_intersector_add (const char *name, const char *medfile_path, const char *interp_method, const char *select_criteria) |
| Add a MEDCoupling intersector. More... | |
| void | cs_medcoupling_intersector_destroy (cs_medcoupling_intersector_t *mi) |
| Destroy a given MEDCoupling intersector. More... | |
| void | cs_medcoupling_intersector_destroy_all (void) |
| Free all allocated intersectors. More... | |
| cs_medcoupling_intersector_t * | cs_medcoupling_intersector_by_id (int id) |
| Get a MEDCoupling intersector using its id. More... | |
| cs_medcoupling_intersector_t * | cs_medcoupling_intersector_by_name (const char *name) |
| Get an intersector by name. More... | |
| cs_real_t * | cs_medcoupling_intersect_volumes (cs_medcoupling_intersector_t *mi) |
| Compute the intersection volumes between the source mesh and code mesh. More... | |
| void | cs_medcoupling_intersector_translate (cs_medcoupling_intersector_t *mi, cs_real_t translation[3]) |
| translate the mesh using a given vector More... | |
| 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 More... | |
| 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. More... | |
| void | cs_medcoupling_intersector_dump_mesh (cs_medcoupling_intersector_t *mi, const char *prefix) |
| dump the mesh of a cs_medcoupling_intersector_t structure More... | |
| 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. More... | |
| void | cs_mi_post_add_mesh (cs_medcoupling_intersector_t *mi) |
| Associate a Medcoupling mesh to the default writer. More... | |
| void _allocate_intersector | ( | cs_medcoupling_intersector_t * | mi, |
| const char * | name, | ||
| const char * | medfile_path, | ||
| const char * | interp_method, | ||
| const char * | select_criteria | ||
| ) |
Initialize a cs_medcoupling_intersector with given parameters.
| [in] | mi | pointer to the cs_medcoupling_intersector_t struct |
| [in] | name | name of the intersector |
| [in] | medfile_path | path to the MED file |
| [in] | interp_method | interpolation method (P0P0, P1P0, ..) |
| [in] | select_criteria | selection criteria |
| void _compute_intersection_volumes | ( | cs_medcoupling_intersector_t * | mi | ) |
Compute intersection matrix and update the intersection array.
| [in] | mi | pointer to the cs_medcoupling_intersector_t struct |
| void _destroy_intersector | ( | cs_medcoupling_intersector_t * | mi | ) |
destroy a given intersector
| [in] | mi | pointer to the cs_medcoupling_intersector_t struct |
| void _dump_medcoupling_mesh | ( | MEDCouplingUMesh * | m, |
| const char * | prefix, | ||
| const char * | filename | ||
| ) |
dump a medcoupling mesh
| [in] | m | MEDCouplingUMesh to dump |
| [in] | prefix | folder where the file is to be written |
| [in] | filename | name of the file to write |
| cs_real_t* cs_medcoupling_intersect_volumes | ( | cs_medcoupling_intersector_t * | mi | ) |
Compute the intersection volumes between the source mesh and code mesh.
| [in] | mi | pointer to the cs_medcoupling_intersector_t struct |
| void cs_medcoupling_intersector_add | ( | const char * | name, |
| const char * | medfile_path, | ||
| const char * | interp_method, | ||
| const char * | select_criteria | ||
| ) |
Add a MEDCoupling intersector.
| [in] | name | name of the intersector |
| [in] | medfile_path | path to the MED file |
| [in] | interp_method | interpolation method (P0P0, P1P0, ..) |
| [in] | select_criteria | selection criteria |
| cs_medcoupling_intersector_t* cs_medcoupling_intersector_by_id | ( | int | id | ) |
Get a MEDCoupling intersector using its id.
| [in] | id | id of the intersector |
| cs_medcoupling_intersector_t* cs_medcoupling_intersector_by_name | ( | const char * | name | ) |
Get an intersector by name.
Get a MEDCoupling intersector by name.
| [in] | name | name of the intersector |
| void cs_medcoupling_intersector_destroy | ( | cs_medcoupling_intersector_t * | mi | ) |
Destroy a given MEDCoupling intersector.
| [in] | mi | pointer to the cs_medcoupling_intersector_t struct |
| void cs_medcoupling_intersector_destroy_all | ( | void | ) |
Free all allocated intersectors.
| void cs_medcoupling_intersector_dump_mesh | ( | cs_medcoupling_intersector_t * | mi, |
| const char * | prefix | ||
| ) |
dump the mesh of a cs_medcoupling_intersector_t structure
translate the mesh using a given vector
| [in] | mi | pointer to the cs_medcoupling_intersector_t struct |
| [in] | prefix | subdir prefix |
| 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
| [in] | mi | pointer to the cs_medcoupling_intersector_t struct |
| [in] | invariant | Invariant point |
| [in] | axis | Rotation axis |
| [in] | angle | angle (in radians) |
| 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.
Transformation is thus applied on the initial coordiantes and the mesh is modified accordingly.
| [in] | mi | pointer to the cs_medcoupling_intersector_t struct |
| [in] | matrix | transformation matrix |
| void cs_medcoupling_intersector_translate | ( | cs_medcoupling_intersector_t * | mi, |
| cs_real_t | translation[3] | ||
| ) |
translate the mesh using a given vector
| [in] | mi | pointer to the cs_medcoupling_intersector_t struct |
| [in] | translation | translation vector |
| void cs_mi_post_add_mesh | ( | cs_medcoupling_intersector_t * | mi | ) |
Associate a Medcoupling mesh to the default writer.
| [in] | mi | pointer to the associated MedCoupling intersector structure |
| 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.
by the user. The writer_id is stored locally..
| [in] | time_dep | > 1 if the writer is transient, else writer is fixed |