Generic refinement

Name

Generic refinement -- Abstract class for adaptive refinement criteria

Synopsis


#include <gfs.h>


#define     GFS_ADAPT                       (obj)
#define     GFS_IS_ADAPT                    (obj)

struct      GfsAdapt;

GfsEventClass* gfs_adapt_class              (void);

Description

All the adaptive refinement criteria are derived from this class. Several refinement criteria can be used at the same time.

The syntax in parameter files is as follows:

[ GfsEvent ] {
  minlevel = 3 maxlevel = 10 
  mincells = 100 maxcells = 100000 
  cmax = 1e-2
  weight = 1
}

with

minlevelThe minimum number of refinement levels (default is 0).
maxlevelThe maximum number of refinement levels.
mincellsThe minimum number of cells in the simulation (default is 0).
maxcellsThe maximum number of cells in the simulation. If this number is reached, the algorithm optimizes the distribution of the cells so that the maximum cost over all the cells is minimized.
cmaxThe maximum cell cost allowed. If the number of cells is smaller than the maximum allowed and the cost of a cell is larger than this value, the cell will be refined.
weightWhen combining several criteria, the algorithm will weight the cost of each by this value in order to compute the total cost (default is 1).

Details

GFS_ADAPT()

#define     GFS_ADAPT(obj)

obj :


GFS_IS_ADAPT()

#define     GFS_IS_ADAPT(obj)

obj :


struct GfsAdapt

struct GfsAdapt {

  GfsFunction * minlevel, * maxlevel;
  guint mincells, maxcells;
  gdouble cmax, weight;
  GfsVariable * c;
  GtsKeyFunc cost;
};


gfs_adapt_class ()

GfsEventClass* gfs_adapt_class              (void);

Returns :