Ejemplo n.º 1
0
struct gmi_iter* gmi_base_begin(struct gmi_model* m, int dim)
{
  struct agm_ent* i;
  i = malloc(sizeof(*i));
  *i = agm_first_ent(to_base(m)->topo, agm_type_from_dim(dim));
  return (struct gmi_iter*)i;
}
Ejemplo n.º 2
0
struct gmi_ent* gmi_base_identify(int dim, int idx)
{
  struct agm_ent e;
  e.type = agm_type_from_dim(dim);
  e.id = idx;
  return gmi_from_agm(e);
}
Ejemplo n.º 3
0
struct gmi_ent* gmi_base_find(struct gmi_model* m, int dim, int tag)
{
  struct agm_ent ae = gmi_look_up(
      to_base(m)->lookup,
      agm_type_from_dim(dim), tag);
  return gmi_from_agm(ae);
}
Ejemplo n.º 4
0
void gmi_base_reserve(struct gmi_base* m, int dim, int n)
{
  agm_reserve(m->topo, agm_type_from_dim(dim), n);
  m->model.n[dim] = n;
}