SCOREC core
Parallel unstructured mesh tools
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Typedefs | Functions
gmi_analytic.h File Reference

GMI analytic model interface. More...

Go to the source code of this file.

Typedefs

typedef void(* gmi_analytic_fun )(double const p[2], double x[3], void *u)
 the analytic parameterization of a model boundary More...
 
typedef void(* gmi_reparam_fun )(double const from[2], double to[2], void *u)
 a re-parametrization from one entity to another More...
 

Functions

struct gmi_modelgmi_make_analytic (void)
 make an empty analytic model
 
struct gmi_ent * gmi_add_analytic (struct gmi_model *m, int dim, int tag, gmi_analytic_fun f, int *periodic, double(*ranges)[2], void *user_data)
 add an entity to the analytic model More...
 
void * gmi_analytic_data (struct gmi_model *m, struct gmi_ent *e)
 get the analytic user data More...
 
void gmi_add_analytic_reparam (struct gmi_model *m, struct agm_use u, gmi_reparam_fun f, void *user_data)
 add a re-parameterization to the model More...
 
void * gmi_analytic_reparam_data (struct gmi_model *m, struct agm_use u)
 get the re-parameterization user data More...
 
void gmi_add_analytic_cell (struct gmi_model *m, int dim, int tag)
 create a non-parametric model entity More...
 
void gmi_add_analytic_region (struct gmi_model *m, int tag)
 gmi_add_analytic_cell(m, 3, tag) More...
 

Detailed Description

GMI analytic model interface.

Definition in file gmi_analytic.h.

Typedef Documentation

typedef void(* gmi_analytic_fun)(double const p[2], double x[3], void *u)

the analytic parameterization of a model boundary

Parameters
pthe input parametric coordinates. see gmi_eval for the format of this array
xthe resuting 3D point in space
upointer to user data

Definition at line 27 of file gmi_analytic.h.

typedef void(* gmi_reparam_fun)(double const from[2], double to[2], void *u)

a re-parametrization from one entity to another

Parameters
fromthe coordinates in the input parametric space
tothe coordinates in the output parametric space
uextra user-provided data

Definition at line 33 of file gmi_analytic.h.

Function Documentation

struct gmi_ent* gmi_add_analytic ( struct gmi_model m,
int  dim,
int  tag,
gmi_analytic_fun  f,
int *  periodic,
double(*)  ranges[2],
void *  user_data 
)

add an entity to the analytic model

Parameters
mthe analytic model
dimthe dimension of the entity
tagthe dimension-unique tag for the entity
fthe analytic function defining the entity. set to NULL for interior entities.
periodicfor each dimension (d) of the entity, gmi_periodic will return periodic[d]
rangesfor each dimension (d) of the entity, gmi_range will return ranges[d]
user_datapointer that will be passed to analytic function for this entity
void gmi_add_analytic_cell ( struct gmi_model m,
int  dim,
int  tag 
)

create a non-parametric model entity

this creates a highest-dimensional model entity. typically users do not create a parametric definition of the 3D regions or 2D faces, since this is equivalent to the analytic function.

void gmi_add_analytic_region ( struct gmi_model m,
int  tag 
)

gmi_add_analytic_cell(m, 3, tag)

this is provided as a bit of backwards compatibility

void gmi_add_analytic_reparam ( struct gmi_model m,
struct agm_use  u,
gmi_reparam_fun  f,
void *  user_data 
)

add a re-parameterization to the model

given a use (u) which is a piece of a boundary, define the map between the parametric space of the used entity and the parametric space of the using entity.

Parameters
mthe analytic model
uthe model use (see agm.h for how to build this)
fthe reparameterization code
user_dataextra data for the re-parameterization code
void* gmi_analytic_data ( struct gmi_model m,
struct gmi_ent *  e 
)

get the analytic user data

this function returns the pointer passed as (user_data) to gmi_add_analytic when creating entity (e)

void* gmi_analytic_reparam_data ( struct gmi_model m,
struct agm_use  u 
)

get the re-parameterization user data

this function returns the pointer passed as (user_data) to gmi_add_analytic_reparam when creating entity (e)