SDT-base         Contents     Functions         Previous Next     PDF Index

fe_def

Purpose

Utilities for FEM related data structures.

Syntax

 ... = fe_def(def,'command', ... )
 ... = fe_def('command', ... )

Description

fe_defmainly provides utilities for SDT def structure handling. It is also used internally to perform parameter recovery.

Commands

CleanEntry

Returns the value of a parameter contained in an SDT button.

The entry can either be

This call does not work for simple SDT buttons in MATLAB format (structures) due to the difficulty to distinguish between DefBut structures and button structures. To exploit this capability, one can place the button in a cell array, or a structure.

For treated button entries, the output is the current value of the button,

For EditT entries, the output is a structure with as many fields as there are buttons in the EditT labeled with the names of the buttons. Each field contains each button value following the rules provided above.

For table entries (cell array with strings, CInCell...), the option -CellField %s gives back specific button fields like name or tooltip instead of current value. (see section 8.3.1 for the list of fields by button type)

% Define a SDT button that can be used in GUI
but=struct('type','string','format','%s','value','val1');
% no action on trivial button in MATLAB format
but=fe_def('cleanentry',but);
% use a cell array in this case
val=fe_def('cleanentry',{but}); val=val{1};

% Place the button in a DefBut
but1=struct('but1',but)
val=fe_def('cleanentry',but1);

% Transform button into Java format (CinCell)
but1=feval(cinguj('@toCinCell'),but);
% recover value with CleanEntry
val=fe_def('cleanentry',but1);

% Place Java button in an EditT object (a set of buttons)
r1j=cinguj('ObjEditJ',struct('but1',but1));
% recover the value of every button of the EditT at once in a struct
RO=fe_def('cleanentry',r1j);

DefEigOpt

w=fe_def('DefEigOpt',mo1) returns a EigOpt set of options for fe_eigfor model mo1. If first searches for a field info,EigOpt in the model stack, or returns a default value, set to [5 20 1e3].

DefFreq, Freq

w=fe_def('DefFreq',model) returns frequencies defined in the info,Freq stack entries using Hz units.

Frequencies can be given using a string urn thus @ll{10,100,5000} uses a log scale spacing. Low level interpretation are in the command fe_def('Freq').

Exp

Performs modal expansion for def structures expressed on reduced DOF, if a reduction basis is provided.

SubDef, SubDof, SubCh

def=fe_def('SubDef',def,ind); keeps deformations associated with ind, which a vector of indices or a logical vector (for example ind=def.data(:,1)<500 can be used to select frequencies below 500). Other fields of the def structure are truncated consistently. A character index such as '1:10:end' is interpreted correctly.

def=fe_def('SubDof',def,DOF) is extracts a subset of DOFs based on defined DOF or with def=fe_def('subdofind',def,ind) indices (again either values or logicals). You can also specify DOFs to be removed with def=fe_def('SubDofRem',def,DofRemoved).

This command is partially redundant with feutilb PlaceInDof called with def2 = feutilb('PlaceInDof',DOF,def). The main difference is the ability to add zeros (use DOF larger than def.DOF) and support sens structures.

fe_def('SubDofInd-Cell',def,ind_dof,ind_def) returns a clean cell array listing selected DOFs and responses. This is typically used to generate clean tables.

fe_def('SubChCurve',def,{'lab',index}) is similar to SubDof but allows but supports more advanced selection for multi-dimensional curves. This command is not fully documented.

C1=demosdt('Curve curved5'); % Sample 5D curve
C2=fe_def('subChCurve',C1,{'Time',1:10;'RPM',1:2});

©1991-2024 by SDTools
Previous Up Next