9.0
general documentation
Loading...
Searching...
No Matches
cs_meg_xdef_wrapper.cxx File Reference
#include "bft/bft_error.h"
#include "base/cs_array.h"
#include "base/cs_base.h"
#include "base/cs_mem.h"
#include "meg/cs_meg_prototypes.h"
#include "meg/cs_meg_xdef_wrapper.h"
Include dependency graph for cs_meg_xdef_wrapper.cxx:

Functions

static void _meg_xdef_wrapper_finalize (void)
 Destroy MEG xdef wrapper arrays.
static cs_lnum_t _meg_alloc_size_from_location (cs_mesh_location_type_t location)
 Get number of elements based on location type.
cs_meg_xdef_input_tcs_meg_xdef_wrapper_add_input (const cs_meg_function_type_t type, const int z_id, const cs_mesh_location_type_t location, const int stride, const char *name, const char *additional_data)
 Add a MEG function xdef wrapper input data. Allocated memory is deleted by cs_meg_xdef_wrapper_finalize.
void cs_meg_xdef_wrapper (cs_real_t time, cs_lnum_t n_elts, const cs_lnum_t *elt_ids, const cs_real_t *coords, bool dense_output, void *input, cs_real_t *retval)
 Wrapper function allowing to call MEG functions by xdef structres. This is done by using the cs_xdef_analytic_function type.

Variables

static int _n_meg_defs = 0
static cs_meg_xdef_input_t ** _meg_defs = NULL

Function Documentation

◆ _meg_alloc_size_from_location()

cs_lnum_t _meg_alloc_size_from_location ( cs_mesh_location_type_t location)
static

Get number of elements based on location type.

◆ _meg_xdef_wrapper_finalize()

void _meg_xdef_wrapper_finalize ( void )
static

Destroy MEG xdef wrapper arrays.

◆ cs_meg_xdef_wrapper()

void cs_meg_xdef_wrapper ( cs_real_t time,
cs_lnum_t n_elts,
const cs_lnum_t * elt_ids,
const cs_real_t * coords,
bool dense_output,
void * input,
cs_real_t * retval )

Wrapper function allowing to call MEG functions by xdef structres. This is done by using the cs_xdef_analytic_function type.

Parameters
[in]timewhen ?
[in]n_eltsnumber of elements to consider
[in]elt_idslist of elements ids (in coords and retval)
[in]coordswhere ?
[in]dense_outputperform an indirection in retval or not
[in]inputpointer to cs_meg_xdef_input_t
[in]retvalresultint value(s). Must be allocated

◆ cs_meg_xdef_wrapper_add_input()

cs_meg_xdef_input_t * cs_meg_xdef_wrapper_add_input ( const cs_meg_function_type_t type,
const int z_id,
const cs_mesh_location_type_t location,
const int stride,
const char * name,
const char * additional_data )

Add a MEG function xdef wrapper input data. Allocated memory is deleted by cs_meg_xdef_wrapper_finalize.

Parameters
[in]typetype of meg function linked to this input
[in]z_idid of zone on which this function is defined
[in]stridestride of data
[in]namename related to function
[in]additional_dataadditional data (char *) provided to function, such as condition or source type
Returns
pointer to newly allocated input data structure

Variable Documentation

◆ _meg_defs

cs_meg_xdef_input_t** _meg_defs = NULL
static

◆ _n_meg_defs

int _n_meg_defs = 0
static