9.0
general documentation
Loading...
Searching...
No Matches
cs_medcoupling_mesh.cxx File Reference
#include "base/cs_defs.h"
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <math.h>
#include "bft/bft_error.h"
#include "bft/bft_printf.h"
#include "base/cs_mem.h"
#include "mesh/cs_mesh.h"
#include "mesh/cs_mesh_connect.h"
#include "base/cs_parall.h"
#include "base/cs_prototypes.h"
#include "base/cs_selector.h"
#include "base/cs_timer.h"
#include "fvm/fvm_defs.h"
#include "fvm/fvm_nodal_from_desc.h"
#include "cs_medcoupling_mesh.hxx"
Include dependency graph for cs_medcoupling_mesh.cxx:

Functions

cs_medcoupling_mesh_tcs_medcoupling_mesh_from_base (cs_mesh_t *csmesh, const char *name, const char *selection_criteria, int elt_dim, int use_bbox)
 create a new cs_medcoupling_mesh_t instance based on cs_mesh_t
cs_medcoupling_mesh_tcs_medcoupling_mesh_from_ids (cs_mesh_t *csmesh, const char *name, cs_lnum_t n_elts, const cs_lnum_t elt_ids[], int elt_dim, int use_bbox)
 create a new cs_medcoupling_mesh_t instance based on cs_mesh_t
void cs_medcoupling_mesh_destroy (cs_medcoupling_mesh_t *mesh)
 Destroy a cs_medcoupling_mesh_t.
void cs_medcoupling_mesh_destroy_all (void)
 Destroy all cs_medcoupling_mesh_t instances.
int cs_medcoupling_mesh_get_dim (cs_medcoupling_mesh_t *m)
 Return a cs_medcoupling_mesh_t structure's spatial dimension.
cs_lnum_t cs_medcoupling_mesh_get_n_elts (cs_medcoupling_mesh_t *m)
 Return a cs_medcoupling_mesh_t structure's number of elements.
const cs_lnum_tcs_medcoupling_mesh_get_elt_list (cs_medcoupling_mesh_t *m)
 Return a cs_medcoupling_mesh_t structure's (parent) elements list.
cs_lnum_t cs_medcoupling_mesh_get_n_vertices (cs_medcoupling_mesh_t *m)
 Return a cs_medcoupling_mesh_t structure's number of vertices.
const cs_lnum_tcs_medcoupling_mesh_get_vertex_list (cs_medcoupling_mesh_t *m)
 Return a cs_medcoupling_mesh_t structure's (parent) vertices list.
const cs_lnum_tcs_medcoupling_mesh_get_connectivity (cs_medcoupling_mesh_t *m)
 Return a cs_medcoupling_mesh_t structure's (parent) elements list.
void cs_medcoupling_mesh_export (cs_medcoupling_mesh_t *m, const std::string name)
 Export a medcoupling_mesh.
void * cs_medcoupling_create_plane_mesh (const cs_real_t origin[], const cs_real_t normal[], const cs_real_t length1, const cs_real_t length2)
 Returns a pointer to a MEDCouplingUMesh of a plane.
void * cs_medcoupling_create_disc_mesh (const cs_real_t origin[], const cs_real_t normal[], const cs_real_t radius, const int n_sectors)
 Returns a pointer to a MEDCouplingUMesh of a disc.
void * cs_medcoupling_create_annulus_mesh (const cs_real_t origin[], const cs_real_t normal[], const cs_real_t radius1, const cs_real_t radius2, const int n_sectors)
 Returns a pointer to a MEDCouplingUMesh of an annulus.

Function Documentation

◆ cs_medcoupling_create_annulus_mesh()

void * cs_medcoupling_create_annulus_mesh ( const cs_real_t origin[],
const cs_real_t normal[],
const cs_real_t radius1,
const cs_real_t radius2,
const int n_sectors )

Returns a pointer to a MEDCouplingUMesh of an annulus.

Parameters
[in]originAnnulus origin coordinates
[in]normalAnnulus normal vector
[in]radius1Annulus inner radius
[in]radius2Annulus outer radius
[in]n_sectorsNumber of sectors for discretization. If negative, default value of 36 is taken.
Returns
pointer to the MEDCouplingUMesh structure.

◆ cs_medcoupling_create_disc_mesh()

void * cs_medcoupling_create_disc_mesh ( const cs_real_t origin[],
const cs_real_t normal[],
const cs_real_t radius,
const int n_sectors )

Returns a pointer to a MEDCouplingUMesh of a disc.

Parameters
[in]originDisc origin coordinates
[in]normalDisc normal vector
[in]radiusDisc radius
[in]n_sectorsNumber of sectors for discretization. If negative, default value of 36 is taken.
Returns
pointer to the MEDCouplingUMesh structure.

◆ cs_medcoupling_create_plane_mesh()

void * cs_medcoupling_create_plane_mesh ( const cs_real_t origin[],
const cs_real_t normal[],
const cs_real_t length1,
const cs_real_t length2 )

Returns a pointer to a MEDCouplingUMesh of a plane.

Parameters
[in]originPlane origin coordinates
[in]normalPlane normal vector
[in]length1Plane's edge length along first axis
[in]length2Plane's edge length along second axis
Returns
pointer to the MEDCouplingUMesh structure.

◆ cs_medcoupling_mesh_destroy()

void cs_medcoupling_mesh_destroy ( cs_medcoupling_mesh_t * mesh)

Destroy a cs_medcoupling_mesh_t.

Parameters
[in]meshcs_medcoupling_mesh_t pointer

◆ cs_medcoupling_mesh_destroy_all()

void cs_medcoupling_mesh_destroy_all ( void )

Destroy all cs_medcoupling_mesh_t instances.

◆ cs_medcoupling_mesh_export()

void cs_medcoupling_mesh_export ( cs_medcoupling_mesh_t * m,
const std::string name )

Export a medcoupling_mesh.

Parameters
[in]meshcs_medcoupling_mesh_t pointer
[in]namename of the file

◆ cs_medcoupling_mesh_from_base()

cs_medcoupling_mesh_t * cs_medcoupling_mesh_from_base ( cs_mesh_t * csmesh,
const char * name,
const char * selection_criteria,
int elt_dim,
int use_bbox )

create a new cs_medcoupling_mesh_t instance based on cs_mesh_t

Parameters
[in]csmeshpointer to cs_mesh_t instance
[in]namename of the mesh
[in]selection_criteriaselection criteria string
[in]elt_dimdimension of elements (2: faces, 3: cells)
[in]use_bboxUse a reduced bounding box
Returns
pointer to the newly created cs_medcoupling_mesh_t struct

◆ cs_medcoupling_mesh_from_ids()

cs_medcoupling_mesh_t * cs_medcoupling_mesh_from_ids ( cs_mesh_t * csmesh,
const char * name,
cs_lnum_t n_elts,
const cs_lnum_t elt_ids[],
int elt_dim,
int use_bbox )

create a new cs_medcoupling_mesh_t instance based on cs_mesh_t

Parameters
[in]csmeshpointer to cs_mesh_t instance
[in]namename of the mesh
[in]n_eltslocal number of elements
[in]elt_idslist of local elements
[in]elt_dimdimension of elements (2: faces, 3: cells)
[in]use_bboxuse a reduced bounding box
Returns
pointer to the newly created cs_medcoupling_mesh_t struct

◆ cs_medcoupling_mesh_get_connectivity()

const cs_lnum_t * cs_medcoupling_mesh_get_connectivity ( cs_medcoupling_mesh_t * m)

Return a cs_medcoupling_mesh_t structure's (parent) elements list.

Parameters
[in]meshcs_medcoupling_mesh_t pointer
Returns
ids of associated elements, or nullptr

◆ cs_medcoupling_mesh_get_dim()

int cs_medcoupling_mesh_get_dim ( cs_medcoupling_mesh_t * m)

Return a cs_medcoupling_mesh_t structure's spatial dimension.

Parameters
[in]meshcs_medcoupling_mesh_t pointer
Returns
associated spatial dimension

◆ cs_medcoupling_mesh_get_elt_list()

const cs_lnum_t * cs_medcoupling_mesh_get_elt_list ( cs_medcoupling_mesh_t * m)

Return a cs_medcoupling_mesh_t structure's (parent) elements list.

Parameters
[in]meshcs_medcoupling_mesh_t pointer
Returns
ids of associated elements, or nullptr

◆ cs_medcoupling_mesh_get_n_elts()

cs_lnum_t cs_medcoupling_mesh_get_n_elts ( cs_medcoupling_mesh_t * m)

Return a cs_medcoupling_mesh_t structure's number of elements.

Parameters
[in]meshcs_medcoupling_mesh_t pointer
Returns
associated number of elements

◆ cs_medcoupling_mesh_get_n_vertices()

cs_lnum_t cs_medcoupling_mesh_get_n_vertices ( cs_medcoupling_mesh_t * m)

Return a cs_medcoupling_mesh_t structure's number of vertices.

Parameters
[in]meshcs_medcoupling_mesh_t pointer
Returns
associated number of vertices

◆ cs_medcoupling_mesh_get_vertex_list()

const cs_lnum_t * cs_medcoupling_mesh_get_vertex_list ( cs_medcoupling_mesh_t * m)

Return a cs_medcoupling_mesh_t structure's (parent) vertices list.

Parameters
[in]meshcs_medcoupling_mesh_t pointer
Returns
ids of associated vertices, or null if all or no local vertices of parent mesh are present.