plugin_src/load/irregular_load.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include "crusde_api.h"

Include dependency graph for irregular_load.c:


Classes

struct  s_load_list_elem
struct  s_load_list

Defines

#define NIL   ((load_list_elem *)0)

Typedefs

typedef s_load_list_elem load_list_elem
typedef s_load_list load_list

Functions

static load_list_elemadd_elem (load_list *list, int x, int y, double height)
static double value_at (load_list *list, int x, int y)
static void destroy (load_list *list)
const char * get_name ()
const char * get_version ()
const char * get_authors ()
const char * get_description ()
PluginCategory get_category ()
void request_plugins ()
 Request necessary plugins: crusde_request_green_plugin("elastic halfspace (pinel)").
void register_output_fields ()
 Register output fields for spatial directions this Green's function calculates.
void run ()
 Performs the fast convolution.
void clear ()
 Clean-up before this plug-in gets unloaded.
void init ()
 Initialization of the convolution. Allocation of memory for inputs and outputs.
void register_parameter ()
 Register parameters this Kernel claims from the input.
double get_value_at (int x, int y, int t)
 Returns the Load of a disk at Point (x,y) at time t.
void set_history_function (loadhistory_exec_function history)

Variables

double * p_rho [100]
char ** p_file [100]
double rho
int dS
double rho_dS_const
int nx = -1
int ny = -1
loadhistory_exec_function history_function [100]
load_listloads [100]
int my_id = 0

Detailed Description

Read load from a file that must be in the following format:

Lon Lat Height

with Lon and Lat being integers in Lambert coordinates and Height determining the load height at the point (Lon,Lat).\


Define Documentation

#define NIL   ((load_list_elem *)0)


Typedef Documentation

typedef struct s_load_list load_list

typedef struct s_load_list_elem load_list_elem

THE LOAD --- trying to be a little memory efficient here. Instead of saving all load values from the give to a gigantic array which is mainly filled with zeros, the values go into this list.


Function Documentation

static load_list_elem* add_elem ( load_list list,
int  x,
int  y,
double  height 
) [static]

void clear (  ) 

Clean-up before this plug-in gets unloaded.

frees load array that was read from file

static void destroy ( load_list list  )  [static]

const char* get_authors (  ) 

PluginCategory get_category (  ) 

const char* get_description (  ) 

const char* get_name (  ) 

double get_value_at ( int  x,
int  y,
int  t 
)

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.

Parameters:
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).
Returns:
The load at Point (x,y,t).

const char* get_version (  ) 

void init (  ) 

Initialization of the convolution. Allocation of memory for inputs and outputs.

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().

< gravity [m/s^2]

< Young's Modulus [GPa]

< Poisson's ratio [-]

< Density of the inviscid fluid [kg/m^3]

< thickness of the elastic plate [m]

void register_output_fields (  ) 

Register output fields for spatial directions this Green's function calculates.

empty

void register_parameter (  ) 

Register parameters this Kernel 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. 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:

  1. rho, XML config identifier is "rho", SI-unit [kg/m^3]

See also:
register_load_param()

register_parameter() (temp_plugin.c.tmp)

void request_plugins (  ) 

Request necessary plugins: crusde_request_green_plugin("elastic halfspace (pinel)").

empty

void run (  ) 

Performs the fast convolution.

empty

void set_history_function ( loadhistory_exec_function  history  ) 

static double value_at ( load_list list,
int  x,
int  y 
) [static]


Variable Documentation

int dS

Area around point P(x,y) [m^2]

loadhistory_exec_function history_function[100]

load_list* loads[100]

int my_id = 0

int nx = -1

int ny = -1

char* * p_file[100]

load definition

double* p_rho[100]

Density of the load [kg/m^3]

double rho

Density of the load [kg/m^3]

double rho_dS_const

rho_dS_const = rho * dS [kg/m]


Generated on Sun Aug 31 13:19:45 2008 for CrusDe by  doxygen 1.5.0