IceUnitModel Class Reference

#include <iMtests.hh>

Inheritance diagram for IceUnitModel:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 IceUnitModel (IceGrid &g, NCConfigVariable &config, NCConfigVariable &overrides)
PetscErrorCode set_grid_defaults ()
 Set grid defaults for a particular unit test.
PetscErrorCode set_vars_from_options ()
 Initialize variables for a particular unit test.
PetscErrorCode run ()
 Run an unit test.
PetscErrorCode writeFiles (const char *filename)
 Write output files.
PetscErrorCode createVecs ()
 Allocate all IceModelVecs defined in IceModel.
PetscErrorCode model_state_setup ()
 Sets the starting values of model state variables.
PetscErrorCode test_IceModelVec3 ()
PetscErrorCode test_IceModelVec3Bedrock ()
PetscErrorCode test_IceModelVec2T ()
PetscErrorCode test_IceModelVec2V ()
PetscErrorCode test_dof1comm ()
PetscErrorCode test_dof2comm ()

Detailed Description

Definition at line 25 of file iMtests.hh.


Constructor & Destructor Documentation

IceUnitModel ( IceGrid g,
NCConfigVariable config,
NCConfigVariable overrides 
)

Definition at line 27 of file iMtests.hh.


Member Function Documentation

PetscErrorCode createVecs (  )  [virtual]

Allocate all IceModelVecs defined in IceModel.

This procedure allocates the memory used to store model state, diagnostic and work vectors and sets metadata.

Default values should not be set here; please use set_vars_from_options().

All the memory allocated here is freed by IceModelVecs' destructors.

Reimplemented from IceModel.

Definition at line 53 of file iMtests.cc.

References PISMVars.add(), IceModelVec2S.create(), IceModel.grid, PISMOptionsIsSet(), IceModelVec.set_attr(), IceModelVec.set_attrs(), IceModel.variables, and IceModel.vH.

PetscErrorCode model_state_setup (  )  [virtual]

Sets the starting values of model state variables.

There are two cases:

1) Initializing from a PISM output file.

2) Setting the values using command-line options only (verification and simplified geometry runs, for example) or from a bootstrapping file, using heuristics to fill in missing and 3D fields.

Calls IceModel.regrid().

This function is called after all the memory allocation is done and all the physical parameters are set.

Calling this method should be all one needs to set model state variables. Please avoid modifying them in other parts of the initialization sequence.

Also, please avoid operations that would make it unsafe to call this more than once (memory allocation is one example).

Reimplemented from IceModel.

Definition at line 38 of file iMtests.cc.

References PISMOptionsIsSet().

PetscErrorCode run (  )  [virtual]

Run an unit test.

Reimplemented from IceModel.

Definition at line 75 of file iMtests.cc.

References PISMOptionsIsSet(), test_dof1comm(), test_dof2comm(), test_IceModelVec2T(), test_IceModelVec2V(), test_IceModelVec3(), and test_IceModelVec3Bedrock().

Referenced by main().

PetscErrorCode set_grid_defaults (  )  [virtual]

Set grid defaults for a particular unit test.

Reimplemented from IceModel.

Definition at line 26 of file iMtests.cc.

References IceModel.grid, IceGrid.Lbz, IceGrid.Mbz, IceGrid.Mx, and IceGrid.My.

PetscErrorCode set_vars_from_options (  )  [virtual]

Initialize variables for a particular unit test.

Reimplemented from IceModel.

Definition at line 34 of file iMtests.cc.

PetscErrorCode test_dof1comm (  ) 
PetscErrorCode test_dof2comm (  ) 
PetscErrorCode test_IceModelVec2T (  ) 
PetscErrorCode test_IceModelVec2V (  ) 
PetscErrorCode test_IceModelVec3 (  ) 
PetscErrorCode test_IceModelVec3Bedrock (  ) 
PetscErrorCode writeFiles ( const char *  filename  )  [virtual]

Write output files.

Reimplemented from IceModel.

Definition at line 114 of file iMtests.cc.

Referenced by main().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Defines
Generated by  doxygen 1.6.2-20100124