#include <complex.h>
#include <fftw3.h>
#include "crusde_api.h"
#include <stdarg.h>
#include <stdio.h>
#include <time.h>
#include <math.h>
Include dependency graph for fast_conv.c:
Defines | |
#define | RESET(x, y) (x = y = -1) |
#define | POSITION(m, n) (n+(N_Y)*m) |
Functions | |
void | register_output_fields () |
Register output fields for spatial directions this Green's function calculates. | |
void | register_parameter () |
Register parameters this Kernel claims from the input. | |
void | request_plugins () |
Request necessary plugins: crusde_request_green_plugin("elastic halfspace (pinel)"). | |
void | init () |
Initialization of the convolution. Allocation of memory for inputs and outputs. | |
void | clear () |
Clean-up before this plug-in gets unloaded. | |
void | run () |
Performs the fast convolution. | |
const char * | get_name () |
const char * | get_version () |
const char * | get_authors () |
const char * | get_description () |
PluginCategory | get_category () |
Variables | |
double * | load_in |
double * | green_in |
double * | conv_out |
double * | green_back |
fftw_complex * | load_out |
fftw_complex * | green_out |
fftw_complex * | conv_in |
fftw_plan | load_plan |
fftw_plan | green_plan |
fftw_plan | conv_plan |
double ** | model_buffer |
double ** | result |
int | N |
int | N_X |
int | N_Y |
int | size_x |
int | size_y |
int | x = -1 |
int | y = -1 |
int | i = 0 |
int | n = -1 |
unsigned long int | t = 0 |
int | dimensions = 1 |
int | displacement_dimensions = 1 |
boolean | is_initialized = false |
void clear | ( | ) |
Clean-up before this plug-in gets unloaded.
This is the place to undo any dynamic ressource binding that has been done by this plug-in during init() or anywhere else during its lifetime. Freeing the ressources is vital to the performance of the simulator.
const char* get_authors | ( | ) |
PluginCategory get_category | ( | ) |
const char* get_description | ( | ) |
const char* get_name | ( | ) |
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.
It calls crusde_register_output_field() as many times as indices are to be registered. The assigned index in the output field is saved to an address that must be provided as a parameter to crusde_register_output_field() Furthermore, it must be said what type of field (X_FIELD|Y_FIELD|Z_FIELD|ADD_FIELD) is to be registered using crusde_register_output_field().
void register_parameter | ( | ) |
Register parameters this Kernel claims from the input.
This function is called right after loading of the Plug-in. It calls register_green_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 -GfirstRegistered/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().
void request_plugins | ( | ) |
Request necessary plugins: crusde_request_green_plugin("elastic halfspace (pinel)").
empty
void run | ( | ) |
Performs the fast convolution.
This function is only called for Kernel Plug-ins. It can be omitted for any other Plug-in type.
fftw_complex * conv_in |
double * conv_out |
fftw_plan conv_plan |
int dimensions = 1 |
int displacement_dimensions = 1 |
double * green_back |
double * green_in |
fftw_complex * green_out |
fftw_plan green_plan |
int i = 0 |
boolean is_initialized = false |
double* load_in |
fftw_complex* load_out |
fftw_plan load_plan |
double** model_buffer |
int n = -1 |
int N |
int N_X |
int N_Y |
double ** result |
int size_x |
int size_y |
unsigned long int t = 0 |
int x = -1 |
int y = -1 |