crusde_api.h File Reference

#include "constants.h"
#include "config.h"
#include "stdarg.h"
Include dependency graph for crusde_api.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define boolean   int
#define true   1
#define false   0
#define NOT_TIME_DEPENDENT   false
#define TIME_DEPENDENT   true

Enumerations

enum  PluginCategory {
  LOAD_PLUGIN = 0, KERNEL_PLUGIN = 1, GREEN_PLUGIN = 2, DATAOUT_PLUGIN = 3,
  POSTPROCESS_PLUGIN = 4, LOADHISTORY_PLUGIN = 5, CRUSTALDECAY_PLUGIN = 6
}
enum  FieldName { X_FIELD = 0, Y_FIELD = 1, Z_FIELD = 2, ADD_FIELD = 3 }
enum  ExitCode { ERROR_MSG = -1, NOERROR = 0 }

Functions

void crusde_error (const char *format,...)
 Prints error message to stderr, exists CrusDe with code ERROR_MSG.
void crusde_debug (const char *format,...)
 Prints debug messages to stderr if compiled with -DDEBUG.
void crusde_warning (const char *format,...)
 Prints warning message to stderr.
void crusde_info (const char *format,...)
 Prints information message to stdout.
double * crusde_register_param_double (const char *param_name, PluginCategory)
 Register double parameter that is required by a plug-in.
double * crusde_register_optional_param_double (const char *param_name, PluginCategory, double)
 Register optional double parameter for a plug-in.
char ** crusde_register_param_string (const char *param_name, PluginCategory)
 Register string parameter that is required by a plug-in, e.g. if you need a file name.
char ** crusde_register_optional_param_string (const char *param_name, PluginCategory, char *)
 Register optional string parameter for a plug-in, e.g. if you want to allow for an optional output file.
void crusde_register_output_field (int *position, FieldName)
 Request space in the output array. This allocates necessary memory for your results.
int crusde_get_size_x ()
 X, Easting dimension of the spatial grid.
int crusde_get_size_y ()
 Y, Northing dimension of the spatial grid.
int crusde_get_size_t ()
 Basically the number of time steps to be modeled.
int crusde_get_gridsize ()
 get size of spatial grid defined in XML model file
int crusde_get_min_x ()
 Minimum X value, i.e. Western limit of the region of interest.
int crusde_get_min_y ()
 Minimum Y value, i.e. Southern limit of the region of interest.
int crusde_get_dimensions ()
 total number of output dimensions
int crusde_get_displacement_dimensions ()
 displacement dimensions that are modeled, e.g. X, Z or X,Y or Z only
int crusde_model_time ()
 return current model time
int crusde_get_timesteps ()
 returns total number of time steps
int crusde_model_step ()
 return current model step, i.e. number of iterations done (temporally)
int crusde_stepsize ()
 Time increment with each model step.
int crusde_get_x_index ()
 Index of X-displacement value in output array.
int crusde_get_y_index ()
 Index of y-displacement value in output array.
int crusde_get_z_index ()
 Index of Z-displacement value in output array.
const char * crusde_get_observation_file ()
const char * crusde_get_out_file ()
 Returns the name of the result file as defined in the XML model file.
int crusde_get_green_at (double **res, int x, int y)
 Get value of Green's function at a specific coordinate.
double crusde_get_load_at (int x, int y)
 Get value of Load function at Point p(x,y).
double crusde_get_load_history_at (int t)
 Get value of Load History function at time t.
double crusde_get_crustal_decay_at (int t)
 Get value of Crustal Decay function at time t.
void crusde_set_result (double **)
 hand model result to Simulation Core
double ** crusde_get_result ()
 retrieve model result from Simulation Core
void crusde_set_quadrant (int)
 Set Coordinate system quadrant (1-4) that we're currently working in.
int crusde_get_quadrant ()
 Get Coordinate system quadrant (1-4) that we're currently working in.
void crusde_exit (ExitCode code)
 Gracefully terminates CrusDe, i.e. shuts down the whole system before exiting with ExitCode 'code'.
int crusde_get_current_load_component ()
 Returns the current load function id such that the load plugins can set the parameter pointers to the respective array index.
void crusde_set_current_load_component (int)
 Update currend load component id.
int crusde_get_number_of_loads ()
 Get total number of load functions defined in the XML model file.
void crusde_set_operator_space (int, int)
 Operator can set the spatial dimensions it works on.
void crusde_get_operator_space (int *, int *)
 Read model dimensions, i.e. Region of Interest.
boolean crusde_crustal_decay_given ()
 Has a crustal decay function been defined?
boolean crusde_load_history_given ()
 Has a load history function been defined?
green_exec_function crusde_request_green_plugin (char *plugin)
 A Green's function plugin can request the run time function of another Green's function plug-in to reuse its functionality.
load_exec_function crusde_request_load_plugin (char *plugin)
 A Load function plugin can request the run time function of another Load function plug-in to reuse its functionality.
run_function crusde_request_kernel_plugin (char *plugin)
 An Operator/Kernel plugin can request the run time function of another operator/kernel plug-in to reuse its functionality.
run_function crusde_request_postprocessor_plugin (char *plugin)
 A Postprocessor plugin can request the run time function of another Postprocessor plug-in to reuse its functionality.
loadhistory_exec_function crusde_request_loadhistory_plugin (char *plugin)
 A Load history function plugin can request the run time function of another Load history function plug-in to reuse its functionality.
crustaldecay_exec_function crusde_request_crustaldecay_plugin (char *plugin)
 A Crustal decay function plugin can request the run time function of another Crustal decay function plug-in to reuse its functionality.

Define Documentation

#define boolean   int
#define false   0
#define NOT_TIME_DEPENDENT   false
#define TIME_DEPENDENT   true
#define true   1

Enumeration Type Documentation

enum ExitCode
Enumerator:
ERROR_MSG 

error message printed, aborting program

NOERROR 

no error occured

enum FieldName
Enumerator:
X_FIELD 
Y_FIELD 
Z_FIELD 
ADD_FIELD 
Enumerator:
LOAD_PLUGIN 
KERNEL_PLUGIN 
GREEN_PLUGIN 
DATAOUT_PLUGIN 
POSTPROCESS_PLUGIN 
LOADHISTORY_PLUGIN 
CRUSTALDECAY_PLUGIN 

Function Documentation

boolean crusde_crustal_decay_given (  ) 

Has a crustal decay function been defined?

References LoadFunction::crustalDecayGiven(), SimulationCore::instance(), and SimulationCore::loadFunction().

Referenced by run().

void crusde_debug ( const char *  format,
  ... 
)

Prints debug messages to stderr if compiled with -DDEBUG.

This function prints a debug message to stderr if CrusDe was compiled with flag -DDEBUG; else nothing is printed; hence debug statements can stay with the code. It is strongly recommended to use this function that works exactly like printf, instead of printf. This way the output of CrusDe is not cluttered with tests and development messages.

Parameters:
format A formatted string following the sprintf conventions
... Elipsis containing the values to be plugged into the format string
Returns:
void
See also:
crusde_warning(), crusde_info(), crusde_error()

Referenced by crusde_register_optional_param_double(), crusde_register_optional_param_string(), crusde_register_param_double(), crusde_register_param_string(), ExperimentManager::ExperimentManager(), InputHandler::getAttributeValue(), InputHandler::getAttributeValueByName(), InputHandler::getGreenJobMap(), InputHandler::getLoadFunctionList(), init(), InputHandler::initParamsFromDOM(), Plugin::load(), LoadPlugin::load(), LoadHistoryPlugin::load(), GreenPlugin::load(), DataOutPlugin::load(), CrustalDecayPlugin::load(), Plugin::Plugin(), PluginManager::PluginManager(), read_alma_output(), InputHandler::readCommandline(), XMLHandler::readXML(), run(), DataOutPlugin::setModelData(), Plugin::unload(), XMLHandler::writeXML(), XMLHandler::XMLHandler(), CrustalDecayPlugin::~CrustalDecayPlugin(), DataOutPlugin::~DataOutPlugin(), GreenPlugin::~GreenPlugin(), InputHandler::~InputHandler(), LoadHistoryPlugin::~LoadHistoryPlugin(), LoadPlugin::~LoadPlugin(), Plugin::~Plugin(), XMLCore::~XMLCore(), and XMLHandler::~XMLHandler().

void crusde_error ( const char *  format,
  ... 
)

Prints error message to stderr, exists CrusDe with code ERROR_MSG.

This function prints an error message to stderr. It works exactly like printf, hence complex message printing is possible. The simulation run will be terminated by calling crusde_exist with the error code ERROR_MSG.

Parameters:
format A formatted string following the sprintf conventions
... Elipsis containing the values to be plugged into the format string
Returns:
void
See also:
crusde_warning(), crusde_info(), crusde_debug(), crusde_exit()

References crusde_exit(), and ERROR_MSG.

Referenced by PluginManager::deleteEntry(), InputHandler::getGreenJobMap(), init(), InputHandler::init(), InputHandler::initParamsFromDOM(), SimulationCore::installPlugin(), SimulationCore::instance(), main(), ParamWrapper::newDouble(), ParamWrapper::newString(), InputHandler::readCommandline(), XMLHandler::readXML(), SimulationCore::registerParam(), and ParamWrapper::setValue().

void crusde_exit ( ExitCode  code  ) 

Gracefully terminates CrusDe, i.e. shuts down the whole system before exiting with ExitCode 'code'.

See also:
ExitCode

References SimulationCore::instance(), and SimulationCore::terminate().

Referenced by crusde_error(), init(), and read_alma_output().

double crusde_get_crustal_decay_at ( int  t  ) 

Get value of Crustal Decay function at time t.

Parameters:
t Time for which the crustal decay function value is sought.
Returns:
double Crustal decay at time t.

References LoadFunction::getCrustalDecayValueAt(), SimulationCore::instance(), and SimulationCore::loadFunction().

Referenced by run().

int crusde_get_current_load_component (  ) 

Returns the current load function id such that the load plugins can set the parameter pointers to the respective array index.

See also:
crusde_set_current_load_component(), crusde_get_number_of_load_components()

References SimulationCore::getLoadFunctionComponent(), and SimulationCore::instance().

Referenced by clear(), get_value_at(), init(), register_parameter(), and set_history_function().

int crusde_get_dimensions (  ) 

total number of output dimensions

See also:
crusde_get_displacement_dimensions()

References SimulationCore::getDimensions(), and SimulationCore::instance().

Referenced by init(), and run().

int crusde_get_displacement_dimensions (  ) 

displacement dimensions that are modeled, e.g. X, Z or X,Y or Z only

See also:
crusde_get_dimensions()

References SimulationCore::displacementDimensions(), and SimulationCore::instance().

Referenced by init().

int crusde_get_green_at ( double **  result,
int  x,
int  y 
)

Get value of Green's function at a specific coordinate.

Parameters:
result pointer to array to which the Green's function (possibly for 3 spatial dimensions) is written
x,y spatial coordinates for which the Green's function is requested
Returns:
Error code

References GreensFunction::getValueArrayAt(), SimulationCore::greensFunction(), and SimulationCore::instance().

Referenced by run().

int crusde_get_gridsize (  ) 

get size of spatial grid defined in XML model file

References SimulationCore::gridSize(), and SimulationCore::instance().

Referenced by get_value_at(), and init().

double crusde_get_load_at ( int  x,
int  y 
)

Get value of Load function at Point p(x,y).

Parameters:
x,y X,Y coordinates of grid point at which the load value is sought.
Returns:
double Load at Point p(x,y).

References LoadFunction::getValueAt(), SimulationCore::instance(), and SimulationCore::loadFunction().

Referenced by run().

double crusde_get_load_history_at ( int  t  ) 

Get value of Load History function at time t.

Parameters:
t Time for which the load history value is sought.
Returns:
double Load History value at time t.

References LoadFunction::getHistoryValueAt(), SimulationCore::instance(), and SimulationCore::loadFunction().

Referenced by run().

int crusde_get_min_x (  ) 

Minimum X value, i.e. Western limit of the region of interest.

See also:
crusde_get_min_y()

References SimulationCore::instance(), and SimulationCore::minX().

Referenced by get_value_at(), and init().

int crusde_get_min_y (  ) 

Minimum Y value, i.e. Southern limit of the region of interest.

See also:
crusde_get_min_x()

References SimulationCore::instance(), and SimulationCore::minY().

Referenced by get_value_at(), and init().

int crusde_get_number_of_loads (  ) 

Get total number of load functions defined in the XML model file.

Returns:
int just what the function suggests

References SimulationCore::getNumberOfLoadComponents(), and SimulationCore::instance().

Referenced by run().

const char* crusde_get_observation_file (  ) 
void crusde_get_operator_space ( int *  nx,
int *  ny 
)

Read model dimensions, i.e. Region of Interest.

Parameters:
*nx pointer to memory slot to which the number of fields in X direction is to be written
*ny pointer to memory slot to which the number of fields in Y direction is to be written
Returns:
void
See also:
crusde_set_operator_space()

References SimulationCore::getOperatorSpaceX(), SimulationCore::getOperatorSpaceY(), and SimulationCore::instance().

const char* crusde_get_out_file (  ) 

Returns the name of the result file as defined in the XML model file.

References SimulationCore::instance(), and SimulationCore::outFile().

Referenced by init().

int crusde_get_quadrant (  ) 

Get Coordinate system quadrant (1-4) that we're currently working in.

See also:
crusde_set_quadrant()

References SimulationCore::getQuadrant(), and SimulationCore::instance().

Referenced by get_value_at().

double** crusde_get_result (  ) 

retrieve model result from Simulation Core

See also:
crusde_set_result()

References SimulationCore::getModelData(), and SimulationCore::instance().

Referenced by run().

int crusde_get_size_t (  ) 

Basically the number of time steps to be modeled.

References SimulationCore::instance(), and SimulationCore::sizeT().

Referenced by init().

int crusde_get_size_x (  ) 

X, Easting dimension of the spatial grid.

See also:
crusde_get_size_y(), crusde_get_size_t()

References SimulationCore::instance(), and SimulationCore::sizeX().

Referenced by init().

int crusde_get_size_y (  ) 

Y, Northing dimension of the spatial grid.

See also:
crusde_get_size_x(), crusde_get_size_t()

References SimulationCore::instance(), and SimulationCore::sizeY().

Referenced by init().

int crusde_get_timesteps (  ) 

returns total number of time steps

References SimulationCore::getTimesteps(), and SimulationCore::instance().

Referenced by init().

int crusde_get_x_index (  ) 

Index of X-displacement value in output array.

References SimulationCore::instance(), and SimulationCore::xIndex().

Referenced by init(), and run().

int crusde_get_y_index (  ) 

Index of y-displacement value in output array.

References SimulationCore::instance(), and SimulationCore::yIndex().

Referenced by init(), and run().

int crusde_get_z_index (  ) 

Index of Z-displacement value in output array.

References SimulationCore::instance(), and SimulationCore::zIndex().

Referenced by init(), and run().

void crusde_info ( const char *  format,
  ... 
)

Prints information message to stdout.

This function prints an information message to stdout. It works exactly like printf, hence complex message printing is possible. The simulation run will be continued.

Parameters:
format A formatted string following the sprintf conventions
... Elipsis containing the values to be plugged into the format string
Returns:
void
See also:
crusde_warning(), crusde_error(), crusde_debug()

References SimulationCore::instance().

Referenced by SimulationCore::addGreenPlugin(), SimulationCore::exec(), InputHandler::getLoadFunctionList(), InputHandler::getPostProcessorNameList(), SimulationCore::init(), init(), main(), InputHandler::readCommandline(), register_output_fields(), Plugin::registerParameter(), and run().

boolean crusde_load_history_given (  ) 

Has a load history function been defined?

References SimulationCore::instance(), SimulationCore::loadFunction(), and LoadFunction::loadHistoryGiven().

Referenced by run().

int crusde_model_step (  ) 

return current model step, i.e. number of iterations done (temporally)

References SimulationCore::instance(), and SimulationCore::modelStep().

Referenced by run().

int crusde_model_time (  ) 

return current model time

References SimulationCore::instance(), and SimulationCore::modelTime().

Referenced by run().

double* crusde_register_optional_param_double ( const char *  name,
PluginCategory  category,
double  default_value 
)

Register optional double parameter for a plug-in.

Use this function if your parameter is optional. Be sure to define sensible Parameter names that convey some context of the actual parameter, e.g., 'E' for Young's modulus or 'g' for gravitational acceleration. Keep in mind that the 'name' is case sensitive.

Parameters:
name Name of the parameter (defines how the parameter has to show up in the XML model file)
category Elipsis containing the values to be plugged into the format string
default_value Obviously the value that this parameter is set to if it's not defined in the input file
Returns:
double* Pointer to the memory slot allocated for the parameter (keep track if you got multiple plug-ins of the same type!)
See also:
PluginCatergory, crusde_register_param_double()

References crusde_debug(), SimulationCore::instance(), ParamWrapper::newDouble(), SimulationCore::registerParam(), and ParamWrapper::setOptional().

char** crusde_register_optional_param_string ( const char *  name,
PluginCategory  category,
char *  default_value 
)

Register optional string parameter for a plug-in, e.g. if you want to allow for an optional output file.

Use this function if your parameter is optional. Be sure to define sensible Parameter names that convey some context of the actual parameter, e.g., 'load_file' for a file that defines the surface load, or 'result' for the result file. Keep in mind that the 'name' is case sensitive.

Parameters:
name Name of the parameter (defines how the parameter has to show up in the XML model file)
category Elipsis containing the values to be plugged into the format string
default_value Obviously the value that this parameter is set to if it's not defined in the input file
Returns:
double* Pointer to the memory slot allocated for the parameter (keep track if you got multiple plug-ins of the same type!)
See also:
PluginCatergory, crusde_register_param_double()

References crusde_debug(), SimulationCore::instance(), ParamWrapper::newString(), SimulationCore::registerParam(), and ParamWrapper::setOptional().

Referenced by register_parameter().

void crusde_register_output_field ( int *  position,
FieldName  field 
)

Request space in the output array. This allocates necessary memory for your results.

CrusDe manages your memory this way and also assures that your results make it into the output data at the specified position. E.g., if the 'position' you get from CrusDe is 5 you will find your results in column 5 of an ascii table or in the 5th index of a netCDF file.

Parameters:
position pointer to memory slot to which the output array position will be written. has to show up in the XML model file)
field claim one of the standard fields (e.g. deformation in X/Y/Z direction; or an additional, user defined field)
Returns:
void
See also:
FieldName

References SimulationCore::instance(), and SimulationCore::registerOutputField().

Referenced by register_output_fields().

double* crusde_register_param_double ( const char *  name,
PluginCategory  category 
)

Register double parameter that is required by a plug-in.

Use this function if your parameter is not optional. Be sure to define sensible Parameter names that convey some context of the actual parameter, e.g., 'E' for Young's modulus or 'g' for gravitational acceleration. Keep in mind that the 'name' is case sensitive.

Parameters:
name Name of the parameter (defines how the parameter has to show up in the XML model file)
category Elipsis containing the values to be plugged into the format string
Returns:
double* Pointer to the memory slot allocated for the parameter (keep track if you got multiple plug-ins of the same type!)
See also:
PluginCatergory, crusde_register_optional_param_double()

References crusde_debug(), SimulationCore::instance(), ParamWrapper::newDouble(), SimulationCore::registerParam(), and ParamWrapper::setOptional().

Referenced by register_parameter().

char** crusde_register_param_string ( const char *  name,
PluginCategory  category 
)

Register string parameter that is required by a plug-in, e.g. if you need a file name.

Use this function if your parameter is optional. Be sure to define sensible Parameter names that convey some context of the actual parameter, e.g., 'load_file' for a file that defines the surface load, or 'result' for the result file. Keep in mind that the 'name' is case sensitive.

Parameters:
name Name of the parameter (defines how the parameter has to show up in the XML model file)
category Elipsis containing the values to be plugged into the format string
Returns:
char** Pointer to the memory slot allocated for the parameter (pointer to a char array (keep track if you got multiple plug-ins of the same type!)
See also:
PluginCatergory, crusde_register_optional_param_string()

References crusde_debug(), SimulationCore::instance(), ParamWrapper::newString(), SimulationCore::registerParam(), and ParamWrapper::setOptional().

Referenced by register_parameter().

crustaldecay_exec_function crusde_request_crustaldecay_plugin ( char *  plugin  ) 

A Crustal decay function plugin can request the run time function of another Crustal decay function plug-in to reuse its functionality.

Parameters:
plugin Name of the Crustal Decay function to be re-used as defined in Plugin Manager, e.g. "exponential"
Returns:
crustaldecay_exec_function Funtion pointer to the 'run()' function of a Crustal decay function, i.e. get_crustal_decay_at ...
See also:
crusde_request_green_plugin(), crusde_request_kernel_plugin(), crusde_request_postprocessor_plugin(), crusde_request_loadhistory_plugin(), crusde_request_load_plugin(), PluginCategory

References SimulationCore::abort(), SimulationCore::addCrustalDecayPlugin(), and SimulationCore::instance().

green_exec_function crusde_request_green_plugin ( char *  plugin  ) 

A Green's function plugin can request the run time function of another Green's function plug-in to reuse its functionality.

This function implements the concept of plug-in reuse. By allowing access to the run-function of a plugin of the same category, a new plugin can build on existing functionality. Instead of having to reimplement fundamental behavior, CrusDe allows to request an executing function and loads the respective plugin in the background. The reusing plugin does not have to worry about having to remember all the correct parameters for the respective plug-in. CrusDe assures that the input file is being checked for those values and that the values make it into the plugin registry and to the plugin.

Parameters:
plugin Name of the Green's function to be re-used as defined in Plugin Manager, e.g. "elastic halfspace (pinel)"
Returns:
green_exec_function Function pointer to the 'run()' function of a Green's function, i.e. get_green_at ...
See also:
crusde_request_load_plugin(), crusde_request_kernel_plugin(), crusde_request_postprocessor_plugin(), crusde_request_loadhistory_plugin(), crusde_request_crustaldecay_plugin(), PluginCategory

References SimulationCore::abort(), SimulationCore::addGreenPlugin(), and SimulationCore::instance().

Referenced by request_plugins().

run_function crusde_request_kernel_plugin ( char *  plugin  ) 

An Operator/Kernel plugin can request the run time function of another operator/kernel plug-in to reuse its functionality.

Parameters:
plugin Name of the operator to be re-used as defined in Plugin Manager, e.g. "fast 2d convolution"
Returns:
run_function Function pointer to the 'run()' function of an operator.
See also:
crusde_request_green_plugin(), crusde_request_load_plugin(), crusde_request_postprocessor_plugin(), crusde_request_loadhistory_plugin(), crusde_request_crustaldecay_plugin(), PluginCategory

References SimulationCore::abort(), SimulationCore::addKernelPlugin(), and SimulationCore::instance().

Referenced by request_plugins().

load_exec_function crusde_request_load_plugin ( char *  plugin  ) 

A Load function plugin can request the run time function of another Load function plug-in to reuse its functionality.

Parameters:
plugin Name of the Load function to be re-used as defined in Plugin Manager, e.g. "irregular load"
Returns:
load_exec_function Function pointer to the 'run()' function of a Load function, i.e. get_load_at ...
See also:
crusde_request_green_plugin(), crusde_request_kernel_plugin(), crusde_request_postprocessor_plugin(), crusde_request_loadhistory_plugin(), crusde_request_crustaldecay_plugin(), PluginCategory

References SimulationCore::abort(), SimulationCore::addLoadPlugin(), and SimulationCore::instance().

loadhistory_exec_function crusde_request_loadhistory_plugin ( char *  plugin  ) 

A Load history function plugin can request the run time function of another Load history function plug-in to reuse its functionality.

Parameters:
plugin Name of the Load history function to be re-used as defined in Plugin Manager, e.g. "sinusoidal"
Returns:
loadhistory_exec_function Function pointer to the 'run()' function of a Load history function, i.e. get_loadhistory_at ...
See also:
crusde_request_green_plugin(), crusde_request_kernel_plugin(), crusde_request_postprocessor_plugin(), crusde_request_load_plugin(), crusde_request_crustaldecay_plugin(), PluginCategory

References SimulationCore::abort(), SimulationCore::addLoadHistoryPlugin(), and SimulationCore::instance().

run_function crusde_request_postprocessor_plugin ( char *  plugin  ) 

A Postprocessor plugin can request the run time function of another Postprocessor plug-in to reuse its functionality.

Parameters:
plugin Name of the postprocessor to be re-used as defined in Plugin Manager
Returns:
run_function Function pointer to the 'run()' function of a Postprocessor function.
See also:
crusde_request_green_plugin(), crusde_request_load_plugin(), crusde_request_kernel_plugin(), crusde_request_loadhistory_plugin(), crusde_request_crustaldecay_plugin(), PluginCategory

References SimulationCore::abort(), SimulationCore::addPostprocessorPlugin(), and SimulationCore::instance().

void crusde_set_current_load_component ( int  id  ) 
void crusde_set_operator_space ( int  nx,
int  ny 
)

Operator can set the spatial dimensions it works on.

This is useful if somebody wants to temporarily store and ACCESS spatial results - arrays are stored linearily.

Parameters:
nx Number of fields in the X direction, i.e., easting
ny Number of fields in the Y direction, i.e., northing
Returns:
void
See also:
crusde_get_operator_space()

References SimulationCore::instance(), and SimulationCore::setOperatorSpace().

Referenced by init().

void crusde_set_quadrant ( int  q  ) 

Set Coordinate system quadrant (1-4) that we're currently working in.

CrusDe is inherently cartesian in nature, if a Green's function, for example, operates in a Cyllindrical world, it might be necessary to know which quadrant we're in to correctly determine the direction cosine.

See also:
crusde_get_quadrant()

References SimulationCore::instance(), and SimulationCore::setQuadrant().

Referenced by run().

void crusde_set_result ( double **  result  ) 

hand model result to Simulation Core

See also:
crusde_get_result()

References SimulationCore::instance(), and SimulationCore::setModelData().

Referenced by run().

int crusde_stepsize (  ) 

Time increment with each model step.

References SimulationCore::instance(), and SimulationCore::stepSize().

Referenced by init().

void crusde_warning ( const char *  format,
  ... 
)

Prints warning message to stderr.

This function prints a warning message to stderr. It works exactly like printf, hence complex message printing is possible. The simulation run will be continued.

Parameters:
format A formatted string following the sprintf conventions
... Elipsis containing the values to be plugged into the format string
Returns:
void
See also:
crusde_error(), crusde_info(), crusde_debug()

Referenced by ExperimentManager::addEntry(), PluginManager::addToDB(), ExperimentManager::deleteEntry(), Plugin::getCategory(), InputHandler::getLoadFunctionList(), SimulationCore::getRegisteredParameters(), init(), Plugin::init(), InputHandler::init(), InputHandler::initParamsFromDOM(), SimulationCore::installPlugin(), InputHandler::jobExists(), GreensFunction::load(), read_alma_output(), XMLHandler::readXML(), SimulationCore::registerOutputField(), Plugin::registerParameter(), run(), XMLCore::XMLCore(), XMLCore::~XMLCore(), and XMLHandler::~XMLHandler().


Generated on Tue Feb 16 15:18:18 2010 for CrusDe by  doxygen 1.6.1-20091004