#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include "crusde_api.h"
Functions | |
const char * | get_name () |
const char * | get_version () |
const char * | get_authors () |
const char * | get_description () |
PluginCategory | get_category () |
void | run () |
empty | |
void | clear () |
empty | |
void | request_plugins () |
empty | |
void | register_output_fields () |
empty | |
void | init () |
Initialize members that depend on registered values. | |
void | register_parameter () |
Register parameters this load function claims from the input. | |
double | get_value_at (int x, int y) |
Returns the Load of a disk at Point (x,y) at time t. | |
void | set_history_function (loadhistory_exec_function history) |
Variables | |
double * | p_height [100] |
double * | p_radius [100] |
double * | p_x [100] |
double * | p_y [100] |
double * | p_rho [100] |
loadhistory_exec_function | history_function [100] |
double | disk_height |
double | disk_radius |
double | disk_x |
double | disk_y |
double | rho |
double | dS |
double | all_const |
double | rho_dS_const |
int | my_id = 0 |
Implements the simple case of a disk load put on a 2 dimensional area.
void clear | ( | ) |
empty
const char* get_authors | ( | ) |
PluginCategory get_category | ( | ) |
References LOAD_PLUGIN.
const char* get_description | ( | ) |
const char* get_name | ( | ) |
double get_value_at | ( | int | x, | |
int | y | |||
) |
Returns the Load of a disk at Point (x,y) at time t.
Computes the euclidean distance of Point (x,y) to (center_x, center_y). If this distance is less or equal to disk_radius the load will be returned, zero otherwise.
x | The x-Coordinate of the wanted value. | |
y | The y-Coordinate of the wanted value. | |
t | The time-Coordinate of the wanted value (set to NO_TIME in non-temporal modelling environment). |
References all_const, crusde_get_current_load_component(), crusde_get_gridsize(), crusde_get_min_x(), crusde_get_min_y(), disk_height, disk_radius, disk_x, disk_y, dS, my_id, p_height, p_radius, p_rho, p_x, p_y, rho, rho_dS_const, xx, and yy.
const char* get_version | ( | ) |
void init | ( | ) |
Initialize members that depend on registered values.
This function must not be called before register_parameter() unless none of the necessary values depends on parameters provided by the user, which are only set after they have been registered. This function is called some time after register_parameter().
void register_output_fields | ( | ) |
empty
void register_parameter | ( | ) |
Register parameters this load function claims from the input.
This function calls register_load_param() defined in crusde_api.h to register references to parameters this Green's function will need to operate properly. For command line use the order of registration in this function defines the identification of parameters in the command line string (i.e. './green -LfirstRegistered/secondRegistered/...'). In case an XML is used to configure the experiment, the reference to this parameter will be identified by the string passed as second argument to register_green_param().
This function registers the references in the following order:
References crusde_get_current_load_component(), crusde_register_param_double(), get_category(), my_id, p_height, p_radius, p_rho, p_x, and p_y.
void request_plugins | ( | ) |
empty
void run | ( | ) |
empty
void set_history_function | ( | loadhistory_exec_function | history | ) |
References crusde_get_current_load_component(), and history_function.
double all_const |
all_const = rho*dS*disk_height, no parts of the load depend on time
Referenced by get_value_at().
double disk_height |
Disk's height [m]
Referenced by get_value_at().
double disk_radius |
Disk's radius [m]
Referenced by get_value_at().
double disk_x |
Disk's center, x-Coordinate[-]
Referenced by get_value_at().
double disk_y |
Disk's center, y-Coordinate[-]
Referenced by get_value_at().
double dS |
Area around point P(x,y) [m^2]
Referenced by get_value_at(), and init().
Referenced by set_history_function().
int my_id = 0 |
double* p_height[100] |
Disk's height [m]
Referenced by get_value_at(), and register_parameter().
double* p_radius[100] |
Disk's radius [m]
Referenced by get_value_at(), and register_parameter().
double* p_rho[100] |
Density of the load [kg/m^3]
Referenced by get_value_at(), and register_parameter().
double* p_x[100] |
Disk's center, x-Coordinate[-]
Referenced by get_value_at(), and register_parameter().
double* p_y[100] |
Disk's center, y-Coordinate[-]
Referenced by get_value_at(), and register_parameter().
double rho |
Density of the load [kg/m^3]
Referenced by get_value_at().
double rho_dS_const |
rho_dS_const = rho * dS, height depends on time
Referenced by get_value_at().