Contents  
Functions  
Index
 
 PDF |

In OpenFEM, elements are defined by element functions. Element functions provide different pieces of information like geometry, degrees of freedom, model matrices, …
OpenFEM functions like the preprocessor femesh, the model assembler fe_mk or the post-processor feplot call element functions for data about elements.
For example, in the assembly step, fe_mk analyzes all the groups of elements. For each group, fe_mk gets its element type (bar1, hexa8, …) and then calls the associated element function.
First of all, fe_mk calls the element function to know what is the rigth call form to compute the elementary matrices (eCall=elem0('matcall') or eCall=elem0('call'), see section 7.15.6 for details). eCall is a string. Generally, eCall is a call to the element function. Then for each element, fe_mk executes eCall in order to compute the elementary matrices.
This automated work asks for a likeness of the element functions, in particular for the calls and the outputs of these functions. Next section gives information about element function writing.
| cEGI | vector of element property row indices of the current element group (without the group header) |
| constit | real (double) valued constitutive information. The constit for each group is stored in Case.GroupInfo{jGroup,4};. |
| def.def | vector of deformation at DOFs. This is used for non-linear, stress or energy computation calls that need displacement information. |
| EGID | Element Group Identifier of the current element group (different from jGroup if an EGID is declared). |
| elt | model description matrix. The element property row of the current element is given by elt(cEGI(jElt),:) which should appear in the calling format eCall of your element function. |
| ElemF | name of element function or name of superelement |
| ElemP | parent name (used by femesh in particular to allow property inheritance) |
| gstate | real (double) valued element state information. |
| integ | int32 valued constitutive information. |
| jElt | number of the current element in cEGI |
| jGroup | number of the current element group (order in the element matrix). [EGroup,nGroup]=getegroup(elt); finds the number of groups and group start indices. |
| nodeE | nodes of the current element. |
| NNode | node identification reindexing vector. NNode(ID) gives the row index (in the node matrix) of the nodes with identification numbers ID. You may use this to extract nodes in the node matrix using something like node(NNode(elt(cEGI(jElt),[1 2])),:) which will extract the two nodes with numbers given in columns 1 and 2 of the current element row (an error occurs if one of those nodes is not in node). This can be built using NNode=sparse(node(:,1),1,1:size(node,1). |
| pointers | one column per element in the current group gives. |
The meaning of the columns is as follows
DofPos Pointers Integ Constit gstate ElMap InfoAtNode EltConst
| DofPos | int32 matrix whose columns give the DOF positions in the full matrix of the associated elements. Numbering is C style (starting at 0) and -1 is used to indicate a fixed DOF. |
| pointers | int32 matrix whose columns describe information each element of the group. Pointers has one column per element giving [OutSize1 OutSize2 u3 NdNRule MatDes IntegOffset ConstitOffset StateOffset] Outsize1 size of element matrix (for elements issued from MODULEF), zero otherwise. MatDes type of desired output. See the fe_mk MatType section for a current list. IntegOffset gives the starting index (first element is 0) of integer options for the current element in integ. ConstitOffset gives the starting index (first element is 0) of real options for the current element in constit. |
| integ | int32 matrix storing integer values used to describe the element formulation of the group. Meaning depends on element family and should be documented in the element property function (p_solid BuildConstit for example). The nominal content of an integ column (as return by the element integinfo call) is MatId,ProId,NDofPerElt,NNodePerElt,IntegRuleType where integrules(ElemP,IntegRuleType) is supposed to return the approriate integration rule. |
| constit | double matrix storing integer values used to describe the element formulation of the group. Meaning depends on element family and should be documented in the element property function (p_solid BuildConstit for example). |
| gstate | double matrix whose columns describe the internal state of each element of the group. By default, column content is stress at integration points (Nstrain× Nw values). Users are of course free to add any appropriate value for their own elements, a typical application is the storage of internal variables. For an example of gstate initialization see fe_stres thermal. |
| ElMap | int32 element map matrix used to distinguish between internal and external element DOF numbering (for example : hexa8 uses all x DOF, then all y ... as internal numbering while the external numbering is done using all DOFs at node 1, then node 2, ...). The element matrix in extrenal sort is given by k_ext=ke(ElMap). EltConst.VectMap gives similar reordering information for vectors (loads, ...). |
| InfoAtNode | a structure with .NodePos (int32) with as many columns as elements in the group giving column positions in a .data field. The each row in .data corresponds to a field that should be described by a cell array of string in .lab for validation / reference building purposes. |
| In particular, T is used for temperature (stack entry info,RefTemp) and 'v1x','v1y','v1z','v2x','v2y','v2z' for local material orientation maps (stack entry info,EltOrient). | |
| Obsolete format : double matrix whose rows describe information at element nodes (as many columns as nodes in the model). | |
| EltConst | struct used to store element formulation information (integration rule, constitutive matrix topology, etc.) Details on this data structure are given in section 7.14.4. |
The EltConst data structure is used in most newer generation elements implemented in of_mk.c. It contains geometric and integration rule properties. The shape information is generated by calls to integrules. The formulation information is generated p_function const calls (see p_solid, p_heat, ...).
| .N | nw × Nnode shape functions at integration points |
| .Nr | nw × Nnode derivative of shape function with respect to the first reference coordinate r |
| .Ns | nw × Nnode derivative of shape function with respect to the second reference coordinate s |
| .Nt | nw × Nnode derivative of shape function with respect to the second reference coordinate t |
| .NDN | Nshape × nw (1+Ndim) memory allocation to store the shape functions and their derivatives with respect to physical coordinates [N N,x N,y N,z]. of_mk currently supports the following geometry rules 3 3D volume, 2 2D volume, 23 3D surface, 13 3D line (see integrules BuildNDN for calling formats). Cylindrical and spherical coordinates are not currently supported. In the case of rule 31 (hyperelastic elements), the storage scheme is modified to be (1+Ndim) × Nshape × nw which preserves data locality better. |
| .jdet | Nw memory allocation to store the determinant of the jacobian matrix at integration points. |
| .bas | 9× Nw memory allocation to store local material basis. This is in particular used for 3D surface rules where components 6:9 of each column give the normal. |
| .Nw | number of integration points (equal to size(EltConst.N,1)) |
| .Nnode | number of nodes (equal to size(EltConst.N,2)=size(EltConst.NDN,1)) |
| .xi | Nnode × 3 reference vertex coordinates |
| .VectMap | index vector giving DOF positions in external sort. This is needed for RHS computations. |