8.3
general documentation
cs_meg_xdef_wrapper.c File Reference
#include "bft_error.h"
#include "cs_array.h"
#include "cs_base.h"
#include "cs_mem.h"
#include "cs_meg_prototypes.h"
#include "cs_meg_xdef_wrapper.h"
+ Include dependency graph for cs_meg_xdef_wrapper.c:

Functions

static void _meg_xdef_wrapper_finalize (void)
 Destroy MEG xdef wrapper arrays. More...
 
cs_meg_xdef_input_tcs_meg_xdef_wrapper_add_input (const cs_meg_function_type_t type, const int z_id, 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. More...
 
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. More...
 

Variables

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

Function Documentation

◆ _meg_xdef_wrapper_finalize()

static 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 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