model.h File Reference

Model structure and its related functions. More...

#include "utils.h"
#include "parser.h"
#include "stencil.h"
#include "grid.h"
#include "rdomain.h"

Go to the source code of this file.

Classes

struct  TIMESTEPINDEX
 Time structure for use with iwave simulators. More...
struct  s_imodel
 Model - data members. More...

Typedefs

typedef s_imodel IMODEL
 Model - data members.
typedef int(*) IMODELINIT_FUN (PARARRAY *pars, FILE *stream, IMODEL *model)

Functions

void next_step (TIMESTEPINDEX *ts)
 Advance simulation time.
int less_than (TIMESTEPINDEX t1, TIMESTEPINDEX t2)
 Compare two time structures.
ireal get_time (TIMESTEPINDEX ts)
 Get current simulation time.
int im_construct (IMODEL *model)
 Sets model struct defaults - base class constructor.
int im_destroy (IMODEL *model, void(*destr)(void **))
 Destroys model (STORAGE DEALLOCATION).
int im_setndim (IMODEL *model)
 Allocates the domain array ld_s, ld_r and set number of neighbor processors (nnei).


Detailed Description

Model structure and its related functions.

Definition in file model.h.


Typedef Documentation

typedef struct s_imodel IMODEL

Model - data members.

Contains almost all data structures for a simulation except the parallel information. Also contains pointer to opaque specs data structure characterizing specific model.

Class structure: this is a base class. Several members represent virtual attributes to be initialized by subclass construction - obviously including specs, but also active field list and various domains.

typedef int(*) IMODELINIT_FUN(PARARRAY *pars, FILE *stream, IMODEL *model)

Definition at line 166 of file model.h.


Function Documentation

void next_step ( TIMESTEPINDEX ts  ) 

Advance simulation time.

If finishing all actions in a time step, increase time index it and reset internal step index iv zero, otherwise increase iv.

Parameters:
[out] ts - (TIMESTEPINDEX)

int less_than ( TIMESTEPINDEX  t1,
TIMESTEPINDEX  t2 
)

Compare two time structures.

Returns:
1, if time index of t1 is less than that of t2, or the two time indices equal and the internal step index of t1 is less than that of t2. Otherwise, return 0.

ireal get_time ( TIMESTEPINDEX  ts  ) 

Get current simulation time.

Returns:
current simulation time.

int im_construct ( IMODEL model  ) 

Sets model struct defaults - base class constructor.

int im_destroy ( IMODEL model,
void(*)(void **)  destr 
)

Destroys model (STORAGE DEALLOCATION).

int im_setndim ( IMODEL model  ) 

Allocates the domain array ld_s, ld_r and set number of neighbor processors (nnei).


Generated on 5 Jan 2017 for IWAVECORE by  doxygen 1.4.7