My Project
programmer's documentation
Functions
cs_medcoupling_utils.cxx File Reference
#include "cs_defs.h"
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <math.h>
#include <mpi.h>
#include <MEDCoupling_version.h>
#include <MEDCouplingUMesh.hxx>
#include <MEDCouplingField.hxx>
#include <MEDCouplingFieldDouble.hxx>
#include "MEDCouplingRemapper.hxx"
#include "bft_error.h"
#include "bft_mem.h"
#include "bft_printf.h"
#include "cs_mesh.h"
#include "cs_mesh_connect.h"
#include "cs_parall.h"
#include "cs_prototypes.h"
#include "cs_selector.h"
#include "cs_timer.h"
#include "fvm_defs.h"
#include "fvm_nodal_from_desc.h"
#include "cs_medcoupling_utils.hxx"
Include dependency graph for cs_medcoupling_utils.cxx:

Functions

static void _assign_vertex_coords (const cs_mesh_t *mesh, cs_lnum_t n_vtx, const cs_lnum_t *vtx_id, MEDCouplingUMesh *med_mesh)
 Assign vertex coordinates to a MEDCoupling mesh structure. More...
 
static void _assign_face_mesh (const cs_mesh_t *mesh, cs_lnum_t n_elts, const cs_lnum_t *elts_list, MEDCouplingUMesh *med_mesh)
 Assign boundary faces to a MEDCoupling mesh structure. More...
 
static void _assign_cell_mesh (const cs_mesh_t *mesh, cs_lnum_t n_elts, const cs_lnum_t *elts_list, MEDCouplingUMesh *med_mesh, int *new_to_old)
 Assign cells to a MEDCoupling mesh structure. More...
 
cs_medcoupling_mesh_tcs_medcoupling_mesh_create (const char *name, const char *select_criteria, int elt_dim)
 create a new cs_medcoupling_mesh_t instance More...
 
void cs_medcoupling_mesh_copy_from_base (cs_mesh_t *csmesh, cs_medcoupling_mesh_t *pmmesh, int use_bbox)
 copy a cs_mesh_t into a cs_medcoupling_mesh_t More...
 
void cs_medcoupling_mesh_destroy (cs_medcoupling_mesh_t *mesh)
 Destroy a cs_medcoupling_mesh_t. More...
 

Function Documentation

◆ _assign_cell_mesh()

static void _assign_cell_mesh ( const cs_mesh_t mesh,
cs_lnum_t  n_elts,
const cs_lnum_t elts_list,
MEDCouplingUMesh *  med_mesh,
int *  new_to_old 
)
static

Assign cells to a MEDCoupling mesh structure.

Parameters
[in]meshpointer to cs_mesh_t structure from which data is copied
[in]n_eltsnumber of cells to assign
[in]elts_listlist of cells to assign
[in]med_meshpointer to MEDCouplingUMesh to which we copy the cells
[in]new_to_oldindirection array between local mesh connectivity and MEDCouplingUMesh connectivity

◆ _assign_face_mesh()

static void _assign_face_mesh ( const cs_mesh_t mesh,
cs_lnum_t  n_elts,
const cs_lnum_t elts_list,
MEDCouplingUMesh *  med_mesh 
)
static

Assign boundary faces to a MEDCoupling mesh structure.

Parameters
[in]meshpointer to cs_mesh_t structure from which data is copie
[in]n_eltsnumber of faces to copy
[in]elts_listlist of faces to copy
[in]med_meshpointer to MEDCouplingUMesh to which we copy the faces

◆ _assign_vertex_coords()

static void _assign_vertex_coords ( const cs_mesh_t mesh,
cs_lnum_t  n_vtx,
const cs_lnum_t vtx_id,
MEDCouplingUMesh *  med_mesh 
)
static

Assign vertex coordinates to a MEDCoupling mesh structure.

Parameters
[in]meshpointer to cs_mesh_t structure from which data is copied
[in]n_vtxnumber of vertices to assign
[in]vtx_idpointer to vertices id's used for assigning
[in]med_meshpointer to MEDCouplingUMesh to which we copy the coordinates

◆ cs_medcoupling_mesh_copy_from_base()

void cs_medcoupling_mesh_copy_from_base ( cs_mesh_t csmesh,
cs_medcoupling_mesh_t pmmesh,
int  use_bbox 
)

copy a cs_mesh_t into a cs_medcoupling_mesh_t

Parameters
[in]csmeshpointer to the cs_mesh_t struct to copy data from
[in]pmmeshpointer to the cs_medcoupling_mesh_t for copy
[in]use_bboxflag indicating if a reduced bounding is used. Usefull for interpolation to reduce the matrix sice. 0: Do not use a reduced bbox 1: Use a reduced bbox

◆ cs_medcoupling_mesh_create()

cs_medcoupling_mesh_t* cs_medcoupling_mesh_create ( const char *  name,
const char *  select_criteria,
int  elt_dim 
)

create a new cs_medcoupling_mesh_t instance

Parameters
[in]namename of the mesh
[in]selection_criteriaselection criteria (entire mesh or part of it)
[in]elt_dimdimension of elements. 2: faces 3: cells
Returns
pointer to the newly created cs_medcoupling_mesh_t struct

◆ 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