#include <entityload.h>
Public Member Functions | |
loadel * | edge2loadel (selement &el, long prop, snode *nodes, long *edgid, long nedgid) |
function returns pointer to a new loadel structure with edge load created from the given entity load, element and edge property id | |
entityload () | |
long | getval (snode &tn, double *nv) |
function computes values of the entity load at the given node | |
long | read (XFILE *in, long lc, long *slc) |
funtion reads entity load from the opened text file | |
loadel * | surface2loadel (selement &el, long prop, snode *nodes, long *surfid, long nsurfid) |
function returns pointer to a new loadel structure with surface load created from the given entity load, element and surface property id | |
void | var2coord (Equation *eq, long &var_x, long &var_y, long &var_z) |
function returns indeces of x, y and z coordinate parameters in the load function | |
loadel * | vol2loadel (selement &el, long prop, snode *nodes) |
function returns pointer to a new loadel structure with volume load created from the given entity load, element and volume property id | |
~entityload () | |
Public Attributes | |
generalfunct | ft |
type of load function | |
Equation ** | func |
array of pointers to parsed functions in case of load defined by function on the edge | |
long | lgcs |
coordinate system on edge (local=1, global=2) | |
long | ncomp |
number of load components (directions) | |
long | nlc |
load case number | |
long | nslc |
subload case number | |
char ** | tfunc |
array of function defintion strings in case of load defined by function on the edge | |
double * | val |
load values in case of constant load |
This class is used for entity load in the mechprep preprocessor. Entity load can be defined either as constant load or by parser function. The parser function has to be defined with three parameters for x, y, z coordinate in order to compute load values for given nodal coordinates.
Definition at line 18 of file entityload.h.
entityload | ( | ) |
~entityload | ( | ) |
loadel * edge2loadel | ( | selement & | el, | |
long | prop, | |||
snode * | nodes, | |||
long * | edgid, | |||
long | nedgid | |||
) |
function returns pointer to a new loadel structure with edge load created from the given entity load, element and edge property id
The function creates new object of the loadel type which contains edge loads generated for given element and its edges with given property.
el | - element whose edge load will be generated | |
prop | - edge property id of the element el where the edge load will be applied | |
nodes | - array with node structures | |
edgid | - array with edge indeces for the given property number prop detected on additional edges | |
nedgid | - the length of array edgid |
Created by Tomas Koudelka, 06.2009 Modified by Tomas Koudelka, 08.2011
Definition at line 238 of file entityload.cpp.
References edge, getval(), loadel::le, lgcs, memset(), ncomp, loadel::ned, nlc, loadel::nlc, loadel::nned, loadel::nnve, loadel::nodvale, and loadel::tel.
Referenced by input_elem_loadedge().
long getval | ( | snode & | tn, | |
double * | nv | |||
) |
function computes values of the entity load at the given node
This function approximates values on the loaded entity to the element node which lay on it. It is used linear approximation.
tn | - node where the load should be approximated | |
nv | - array with approximated nodal values |
0 | - on succes | |
1 | - in case of unknown type of load function |
Definition at line 187 of file entityload.cpp.
References QList< type >::at(), Equation::Evaluate(), ft, func, ncomp, pars, stat, val, variable::Value, var2coord(), and Equation::Variables.
Referenced by edge2loadel(), surface2loadel(), and vol2loadel().
long read | ( | XFILE * | in, | |
long | lc, | |||
long * | slc = NULL | |||
) |
funtion reads entity load from the opened text file
This function reads data about entity load from the text file given by the parameter in
in | - pointer to the opned text file | |
lc | - total number of load cases | |
slc | - pointer to array with number of subloadcases for particular load cases, default value is NULL |
0 | - on succes | |
1 | - unsupported function type is required | |
2 | - invalid type of load coordinate system | |
3 | - function has insufficient number of parameters | |
4 | - wrong name of function parameters |
Definition at line 60 of file entityload.cpp.
References ft, func, generalfunct_kwdset(), lgcs, memset(), ncomp, nlc, nslc, pars, stat, Parser::TextToTree(), tfunc, val, var2coord(), and xfscanf().
Referenced by input_elem_loadedge(), input_elem_loadsurf(), and input_elem_loadvol().
loadel * surface2loadel | ( | selement & | el, | |
long | prop, | |||
snode * | nodes, | |||
long * | surfid, | |||
long | nsurfid | |||
) |
function returns pointer to a new loadel structure with surface load created from the given entity load, element and surface property id
The function creates new object of the loadel type which contains surface loads generated for given element and its surfaces with given property.
el | - element whose surface load will be generated | |
prop | - surface property id of the element el where the surface load will be applied | |
nodes | - array with node structures | |
surfid | - array with surface indeces for the given property number prop detected on additional surfaces | |
nsurfid | - the length of array surf |
Created by Tomas Koudelka, 06.2009 Modified by Tomas Koudelka, 08.2011
Definition at line 342 of file entityload.cpp.
References getval(), lgcs, loadel::ls, memset(), ncomp, nlc, loadel::nlc, loadel::nnsurf, loadel::nnvs, loadel::nodvals, loadel::nsurf, surface, and loadel::tel.
Referenced by input_elem_loadsurf().
void var2coord | ( | Equation * | eq, | |
long & | var_x, | |||
long & | var_y, | |||
long & | var_z | |||
) |
function returns indeces of x, y and z coordinate parameters in the load function
The function returns indeces of 'x' parameter, 'y' parameter and 'z' parameter of the function defined in eq. Performed comparison is case insesitive.
eq | - pointer to the parsed function | |
var_x | - index of x-coordinate (used by eq->Variables.at function) | |
var_y | - index of y-coordinate (used by eq->Variables.at function) | |
var_z | - index of z-coordinate (used by eq->Variables.at function) |
Definition at line 126 of file entityload.cpp.
References QList< type >::at(), variable::Name, and Equation::Variables.
loadel * vol2loadel | ( | selement & | el, | |
long | prop, | |||
snode * | nodes | |||
) |
function returns pointer to a new loadel structure with volume load created from the given entity load, element and volume property id
The function creates new object of the loadel type which contains volume loads generated for given element and its volume with given property.
el | - element whose volume load will be generated | |
prop | - surface property id of the element el where the volume load will be applied | |
nodes | - array with node structures |
Created by Tomas Koudelka, 06.2009
Definition at line 444 of file entityload.cpp.
References getval(), memset(), ncomp, nlc, loadel::nlc, loadel::nnvv, loadel::nodvalv, loadel::tel, and volume.
Referenced by input_elem_loadvol().
type of load function
Definition at line 45 of file entityload.h.
Referenced by entityload(), getval(), and read().
array of pointers to parsed functions in case of load defined by function on the edge
Definition at line 48 of file entityload.h.
Referenced by entityload(), getval(), read(), and ~entityload().
long lgcs |
coordinate system on edge (local=1, global=2)
Definition at line 46 of file entityload.h.
Referenced by edge2loadel(), entityload(), read(), and surface2loadel().
long ncomp |
number of load components (directions)
Definition at line 42 of file entityload.h.
Referenced by edge2loadel(), entityload(), getval(), read(), surface2loadel(), vol2loadel(), and ~entityload().
long nlc |
load case number
Definition at line 43 of file entityload.h.
Referenced by edge2loadel(), entityload(), input_elem_loadedge(), input_elem_loadsurf(), input_elem_loadvol(), read(), surface2loadel(), and vol2loadel().
long nslc |
subload case number
Definition at line 44 of file entityload.h.
Referenced by input_elem_loadedge(), input_elem_loadsurf(), input_elem_loadvol(), and read().
char** tfunc |
array of function defintion strings in case of load defined by function on the edge
Definition at line 49 of file entityload.h.
Referenced by entityload(), read(), and ~entityload().
double* val |
load values in case of constant load
Definition at line 47 of file entityload.h.
Referenced by entityload(), getval(), read(), and ~entityload().