feutilb#
Purpose
Gateway function for advanced FEM utilities in SDT.
Description
This function is only used for internal SDT operation and actual implementation will vary over time. The following commands are documented to allow user calls and SDT source code understanding.
AddNode#
This command provides optimized operation when compared to the feutil equivalent and finer control.
CaseC2SE#
Constraint penalization. This command packages the penalization of all constraints in the model. Types FixDOF, RBE3, MPC, rigid are supported.
model=feutilb('CaseC2SE''model,list); returns the model with penalized constraints. The constraints are then transformed into coupling superelements in the model. model is an SDT model. list is an optional restriction cell array of constraint names to be transformed. If omitted all found constraints are penalized.
 kpval allows defining a custom penalization coefficent. By default the value stored in sdtdef('kcelas') is used.
 kpAutoval asks to use an automated estimation of kp based on the local compression stiffness in the area concerned by each constraint separately. val can be optionnaliy set as a corrective factor to alter the base estimation.
 keepName allows keeping the constraints names for superelements. The names are transformed to comply with the superelement naming rules, see section 6.3 for more information. The base case uses names as typN with typ the type of constraint in lower case and N the occurence number in the penalization sequence.
 CMT tells the command to operate on a preassembled reduced model SE,MVR.
 dummy generates dummy superlements based on the constraint DOF. For each constraint a superelement featuring a null striffness matrix expressed on the constraint DOF is added to the model, the constraint itself is unchanged. Their nameas are formed using prefix 1d the constraint type and an index. This feature allows generating an explicit connectivity induced by the constraint, altering associated combined node/element selection behavior.
CaseL2G#
Case resolution in the global frame. Case definition using node displacement local frame DID is supported, resolution schemes are however unpractical and conventions may depend on the code, see section 7.14 for conventions used in SDT. It is thus strongly recommended to resolve local frame based constraints before running the model.
model=feutilb('CaseL2G'',model,); returns the model with constraints projected in the global frame. The following operations are performed
 mpc, rigid, rbe3, FixDOF entries are transformed into generic mpc constraints and a projected onto the global frame.
 sensdof entries defined with a .cta field are projected in the global frame.
 dofset, dofload entries are projected into the global frame.
 rigidelements are covnerted into a case entry for an equivalement treatment
 celasand mass2elements support DID implementation and are thus assembled into a coupling superelement.
 DID entries are removed from the .Node matrix as resolution was performed
 model.Stack{'curve','OLDcGL'} is generated as a structure with fields .DOF and .def to store the local to global projection matrix for potential further use.
CombineModel#
mo1=feutilb('combinemodel',mo1,mo2); [mo1,r1]=feutilb('combinemodel',mo1,mo2);
Integrated combining of two separate models. This call aims at creating an assembly from two separate mechanical components. This command properly handles potential NodeId, EltId, ProId, or MatId overlaying by setting disjoint ID sets before assembly. Stack or Case entries with overlaying names are resolved, adding (1) to common names in the second model. Sets with identical names between both models are concatenated into a single set. The original node numbering matrix for mo2 is output as a second argument (r1 in the second example call). The original element numbering matrix for mo2 can also be output as a third argument.
mo1 is taken as the reference to which mo2 will be added, the Node/Elt appending is performed by feutilAddTest.
 Command option cleanMP cleans up duplicated mat/pro entries in the combined model.
 Command option noSetCat, forces the sets duplication with incremented names (adding (1)), instead of concatenation when sets with identical names are found.
 Command option CompatNodeElt asks not to shift NodeId and EltId in the second model. It then assumes the ID ranges are fully compatible in both models.
 Command option CompatMatPro asks not to shift MatId and ProId in the second model. It then assumes these IDs to be fully compatible between both models.
 Command option CompatBas asks no to shift the BasId in the second model. It then assumes these IDs to be fully compatible between both models.
GeoLineTopo, ...#
r2=feutilb('geolinetopo',model,struct('starts',nodes)); r2=feutilb('geolinetopo',model,struct('starts',RO.nodes(j1,1), ... 'cos',0,'dir',r1.p(:,2)','circle',r1));
GeoLineTopo searches a topological line by following mesh edges.
Accepted fields are
 .starts node numbers. One row per line.
 .cos optional tolerance on direction change used to stop the line.
 .dir optional initial search direction, in not provided the direction defined by the line linking the two first nodes is used
 .forcedir optional, to force a constant head direction search. This can be used for disturbed lines where local direction variations may induce an unwanted dramatic change or natural direction for the line topology. Quasistraight lines can thus be obtained in non rules meshes.
 .noSplitTh optional in combination with .forcedir, locally relieves the forcedir constraint if separation of points at a specific step cannot be clearly distinguished along forcedir. In case of non planar topologies, the forcedir head direction may become orthogonal to the local direction seen on the line. In such case, if several points have to be separated for the next line step, one gets the one closer to the forcedir provided. If the forcedir is orthogonal to the currently natural directions, the separation criterion be illposed. nlSplitTh provides a tolerance for the dispersion of the next local directions under which the natural local direction is used for the choice instead of the forcedir.
 .circle optional, to use a detection strategy adapted to circle, with richer information. This field is a structure with fields
 .Origin the coordinates of the circle origin
 .radius the circle radius
 .p the local basis associated to the circle principal directions
 .cos set to zero
 .dir the normalized direction of the normal to the plane containing the circle.
GeoFindCircle packages the GeoLineTopo command to detect nodes on a quasicircular mesh,
GeoFindCircle, ...#
GeoFindCircle searches a topological circular line by following mesh edges. One can either provide three points one the circle, or one point with origin and axis.
r2=feutilb('geofindcircle',model,struct('nodes',[n1 ...]); r2=feutilb('geofindcircle',model,... struct('nodes',n1,'Origin',[x y z],'axis',[nx ny nz]);
where n1 is a NodeId, x,y,z are the coordinates of the circle origin, nx, ny, nz is the normal to the plane containing the circle.
The output r2 contains fields
 .Origin the coordinates of the circle origin.
 .normal the normalized direction of the normal to the plane containing the circle.
 .radius the circle radius
 .p the local basis associated to the circle principal directions
 .line the list of NodeId that belong to the circle
The following example illustrates how one can exploit this feature to define a connection screw based on a hole in plates.
% use the demonstration model for screw defintions with two plates model=demosdt('demoscrew layer 0 40 20 3 3 layer 0 40 20 4'); % use 3D line pick to find three nodes on the hole % fe_fmesh('3dlineinit') % acitvate option, and click on 3 nodes on the hole nodes=[47 43 40]; % nodes picked on the hole % detect hole r1=feutilb('geofindcircle',model,struct('nodes',nodes)); r1=r1{1}; n1=feutil('getnodegroupall',model); n2=n1; % define planes: need to detect plane altitudes % 1 transform coordinates in the local hole basis for planes generation n1(:,5:7)=(n1(:,5:7)ones(size(n1,1),1)*r1.Origin)*r1.p; [z1,i1]=unique(n1(:,7)); % 2 use global altitudes for the elements detection z2=n2(i1,7); % use type 1 r2=[num2cell([z1 1+0*z1]) ... cellfun(@(x) sprintf('z==%.15g',x),num2cell(z2),'uni',0)]; % 3 screw model, see sdtweb fe_case r2=struct('Origin',r1.Origin,'axis',r1.normal','radius',r1.radius, ... 'planes',{r2},... 'MatProId',[101 101],'rigid',[Inf abs('rigid')],... 'NewNode',0); model=fe_caseg('ConnectionScrew',model,'screw1',r2); % compute modes to test def=fe_eig(model,[5 10 1e3]); cf=feplot(model); cf.def=def;
GeoFindSphere#
GeoFindSphere searches a topological sphere surface passing through four given points (not coplanar).
r2=feutilb('geofindsphere',model,struct('nodes',[n1 ...]);
where n1 is a NodeId list, with at least four entries.
The output r2 contains fields
 .Origin the coordinates of the sphere origin.
 .radius the sphere radius
GeomRB,[Mass,ByParts,Beam1]#
def=feutilb('geomrb',node,RefXYZ,adof,m) returns a geometric rigid body modes. If a mass matrix consistent with adof is provided the total mass, position of the center of gravity and inertia matrix at CG is computed. You can use def=feutilb('geomrb cg',Up) to force computation of rigid body mass properties.
def=feutilb('geomrbMass',model) returns the rigid body modes and mass, center of gravity and inertia matrix information. bygroup, bymat, bypro can be used to detail results by subgroups. With no output argument, the results are shown in a table that can be copied to other software.
def=feutilb('GeomRbByParts',model) returns the rigid body modes of the model taking into account unconnected regions. Each unconnected mesh region is considered as a different part for which a set of 6 rigid body modes will be generated. def containts then a sequence of six rigid body modes by unconnected mesh region, placed in the global model DOF.
il=feutilb('GeomRBBeam1',mdl,RefXYZ) returns standard p_beam properties for a given model section where RefXYZ is the coordinates of the reference point from the gravity center.
feutilb('GeomRB',mdl,[0 0 0],sens) or feutilb('GeomRB',mdl,[0 0 0],Load) provide a rigid body check of the work generated by loads or loads collocated to sensors on rigid body motion. This provides a direction of application and moments around the origin. These are then used to estimate a point that would lead to the same moments. This point should be on a line of direction of force and containing the actual application point (x_{true}=x_{est} + α d_{x}, ...)
GetUsedNodes#
Node=feutilb('GetUsedNodes',model); returns the model nodes that are effectively used in the model. This command accounts for nodes present in SE elements and nodes used in Case constraints that may be not used by elements in model.Elt.
% Used nodes recovery in a model % Use a base model with a rigid ring using a node not used by other elements model=demosdt('demoscrew layer 0 40 20 3 3 layer 0 40 20 4'); % create model r1=struct('Origin',[20 10 0],'axis',[0 0 1],'radius',3, ... 'planes',[1.5 0 111 1 3.1; 5.0 0 112 1 4;], ... 'rigid',[Inf abs('rigid')],... 'NewNode',0); model=fe_caseg('ConnectionScrew',model,'screw1',r1); cf=feplot(model); % show model fecom('promodelviewon');fecom('curtab Cases','screw1');% Used nodes recovery strategy n1=feutil('getnodegroupall',cf.mdl); % selects nodes used in model.Elt only %n2=feutil('optimmodel',cf.mdl); % obsolete call that is based on GetNodeGroupall n3=feutilb('GetUsedNodes',cf.mdl);
setdiff(n3(:,1),n1(:,1)) % node exclusively used by rigid case
Match#
Non conform mesh matching utilities. The objective is to return matching elements and local coordinates for a list of nodes.
Matching elements mean
 for volumes, that the physical node is within the element. If volumes may be negative, check orientation using feutil orient.
 for surfaces, that the orthogonal projection of the node is within the element
 for lines that the orthogonal projection on the line is between the line extremities.
A typical node matching call would be
% Example of a base match call model=femesh('test hexa8'); match=struct('Node',[.1 .1 .1;.5 .5 .5;1 1 1]); match=feutilb('match info radius .9 tol 1e8',model,match)
% Example of a matchSurf call model=demosdt('demoTwoPlate'); % get nodes of half bottom plate n1=feutil('getnode z==0 & y>.5',model); % prepare the match structure match=struct('Node',n1(:,5:7)); % perform surface match on the top plate selection match=feutilb('matchsurf',model,match,'innode{z==.1}'); % display model and nodes cf=feplot(model); fecom(cf,'shownodemark',match.Node,'marker','o'); % display initial nodes % then overlay matched points fecom(cf,'shownodemarknoclear',match.StickNode,'marker','s','color','b')% Use InterpNormal token to get clean normal at matched point match=struct('Node',n1(:,5:7),'InterpNormal',1); match=feutilb('matchsurf',model,match,'innode{z==.1}'); fecom(cf,'showmap',struct('vertex',match.StickNode,... 'normal',match.InterpNormal))
Accepted command options are

MatchSurf has the same objective but uses a completely different strategy to match nodes on a surface. This is typically well suited for contact applications (node to surface matching).
 Note that only the input model skin is treated. This is done by default through a selface command to avoid the need for user treatment for base applications, see FindElt. It is possible to provide in a third argument a FindElt string providing a customized face selection of the model.
 It is possible to get normals interpolated by shape functions at matched points using the InterpNormal token in the input match structure.
 radius rad. The search is limited to points that are not too far a way from matchable element centers. Defining a search radius manually can help prevent matching for elements that are too far away or on the contrary allow matching within elements that are very large so that interior points may be far from the center.
 tolval modifies the 1e8 tolerance used to stop the nonlinear search for the match point in second order elements
The output structure contains the fields
.Node  original positions 
.rstj  position in element coordinates and jacobian information. 
.StickNode  orthogonal projection on element surface if the original node is not within the element, otherwise original position. 
.Info  one row per matched node/element giving NodeId if exact match (0 otherwise), number of nodes per element, element type (1 (1D), 2 (2D), 3 (3D), or 5 (SE), an element code and a distance indicator. 
.match  obtained when calling the command with info, typically for row by row postprocessing of the match. A cell array with one row per matched node/element giving eltname, slave element row, rstj, sticknode 
.slave  an element matrix providing for each node of field .Node the matched element. 
.slaveind  the element index (cEGI) in the .Elt matrix of input model providing for each node of field .Node the matched element index. 
.master  a subindex vector providing only the matched nodes in other fields. 
MeasThick,Show#
Measure of thickness through a volume. Thickness is here defined as the distance from a node on a surface to another surface along the node face normal direction. The base call requires a surface selection on a wolume mesh from which thickness is measured. The measure in internally performed as a feutilb Match call on the other surfaces connected to the surface selected (then assumed fully connected).
The definition of thickness is not unique in the general case, so that peculiar effects can be obtained, especially at corner locations. The defintion chosen here correctly suits thin 3D volumes for which the closest surface nodes to a given surface point is in the opposite surface.
The following commands are supported
 sel"EltSel" can be used to specify a FindElt command defining the surface from which the measure is performed.
 set"name" can be used to directly provide a FaceId set instead of a seletion through sel.
 osel"EltSel" can be used to restrict match by providing the surfaces facing be the base selection, using a FindElt command.
 smooth can be used to smooth the response by interpolating unmatched points or out of tolerance points.
 sTol provides a tolerance over which thickness is considered too large and declared the point unmatched.
 show directly calls command MeasThickShow to display the thickness map in feplot.
Command MeasThickShow performs a display of the thickness map on the mesh in feplot.
% Thickness measurment and display model=demosdt('demoUBeam NoPlot'); % demo model model=feutil('divide 4 4 4',model); % some refinement [eltid,model.Elt]=feutil('eltidfix;',model); % clean EltId cf=feplot(model); RO=struct('sel','selface & innode{y==0.5}',... 'osel','selface & innode{notin{innode{z==0z==2.5y==.5}}}') d1=feutilb('MeasThickShow',cf.mdl,RO);
MpcFromMatch#
This command is used to build multiple point constraints from a match.
model=feutilb('MpcFromMatch',model,match).
The default output is the model with added MPC. The following command options are available
 entry to output the MPC structure instead of the model.
 keepAll not to remove any observation line from the node list.
 UseDOFdofi to provide alternative DOF, this is usefull for nonmechanical DOF.
 UseRot to keep rotation DOF constraints.
 Rot to generate an MPC on rotation DOF only.
 NoOff not to account for StickNode offsets.
The solution retained for surfaces is to first project the arbitrarily located connection point P on the element surface onto a point Q on the neutral fiber used where element nodes are located. Then Q1 or P1 shape functions and their derivatives are used to define a linear relation between the 6 degree of freedom of point Q and the 3 or 4 nodes of the facing surface. Motion at P is then deduced using a linearized rigid PQ link. One chooses to ignore rotations at the nodes since their use is very dependent on the shell element formulation.
The local element coordinates are defined by x_{j}^{e},j=1:3 along the r coordinate line
(10.3) 
y^{e} that is orthogonal to x^{e} and in the x^{e}, ∂ N_{i}/∂ sx_{ij} plane, and z^{e} that defines an orthonormal basis.
The local rotations at point Q are estimated from rotations at the corner nodes using
(10.4) 
with u_{ik} the translation at element nodes and j=1:3, i=1:N_{node}, k=1:3. Displacement at Q is interpolated simply from shape functions, displacement at P is obtained by considering that the segment QP is rigid.
For volumes, displacement is interpolated using shape functions while rotations are obtained by averaging displacement gradients in orthogonal directions
(10.5) 
You can check that the constraints generated do not constrain rigid body motion using fe_caseg('rbcheck',model) which builds the transformation associated to linear constraints and returns a list of DOFs where geometric rigid body modes do not coincide with the transformation.
PlaceInDof#
This command places DOF based matrices into different sets of DOFs. This can thus be used for def curves, observation, constraint, models or matrices. For subsets of DOFs a direct elimination is performed; if the new DOF set contains exclusive DOF, zeros are added, as no expansion is performed here.
This is typically used to eliminate DOFs, add zeros for unused DOFs or simply reorder DOFs. See also fe_def SubDof.
High level calls for data structures are supported using syntax data= feutilb('PlaceInDof',DOF,data); where DOF is the new set of DOF and data is a structure whose fields depends on the type of matrix
 .def and .DOF are necessary for a deformation field, in coherence with the def curve structure.
 .cta and .DOF for an observation matrix coherent with sensor defintions.
 .c and .DOF for a constraint matrix, coherence with mpc definitions. This bears the same base treatment as for the observation matrix but also handles field .slave is defined.
 .K and .DOF for an assembled model. For reduced models the restitution data entry infoSeRestit in .Stack field is also handled, see fesuper SEDef for more information.
The other fields are left unchanged.
Lower level calls for matrices are supported using syntax mat=feutilb('PlaceInDof',DOF,oldDOF,mat);. This call then returns the data matrix placed in the new DOF field, assuming that matrix mat is based on oldDOF. Depending on the size of mat, feutilb assumes the type of matrix it handles,
 A square matrix of size oldDOF is supposed to be a model matrix (stiffness, ...).
 A rectangular matrix with the line dimension equal to the number of oldDOF (i.e. size(mat,1)==length(oldDOF)) is supposed to be a deformation field.
 A rectangular matrix with the column dimension equal to the number of oldDOF i.e. size(mat,2)==length(oldDOF)) is supposed to be an observation matrix.
SeparateByMat,Pro#
Command SeparateBy ensures that only one MatId or ProId exist in each element group. If a group contains several MatId or ProId the group will be split in the element list, so that the new groups are inserted directly after the currently split group.
By default the criterion is based on MatId, use command SeparateByPro to base it on the ProId. To avoid separating in too many groups, the default Max20 option is used. To bypass this limit specify a larger maximum number of groups.
% Separate elements groups by Mat/ProId % demonstration model model=demosdt('demoubeam noplot'); % observe element groups feutil('info',model) % apply different MatId to different selections i1=feutil('findelt withnode{z>1&z<=2}',model); i2=feutil('findelt withnode{z>2}',model); mpid=feutil('mpid',model.Elt); mpid(i1,1)=2; mpid(i2,1)=3; model.Elt=feutil('mpid',model.Elt,mpid); % now one group with several MatId feutil('info',model) % apply group separation model.Elt=feutilb('SeparateByMat',model.Elt); % now three groups with unique MatId feutil('info',model)
SubModel#
This command aims at extracting a functional model from a selection of an element subset. From a FindElt selection, this command
 Removes unused nodes
 Cleans up the set stack entries. Sets are updated (and removed is they become empty)
 Cleans up the mat/pro entries, unused properties are removed
 Cleans up the case entries, constraints are adapted or removed if external to the submodel (RBE3 or rigid with removed slave or master elements are cleared), loads are adapted or removed if external. By default constraints are handled as elements regarding the selection.
 Updates info,Rayleigh and info,Omega stack entries.
If the FindElt command is omitted or set to groupall, the cleanup is performed on the whole model.
The following command options can be used not to clear some specific fields
 keepStack not to clean the stack.
 keepCase not to clean the case stack.
 keepMatPro not to clean pl/il entries.
 keepIntSE to keep superelements whose nodes are fully contained in the selection provided. This option can be usefull to keep coupling superelements when the selection is related to component combinations.
 keepNodes to keep all nodes (additional unused nodes are usually not a problem), it allows a higher robustness for applications where some nodes are only used in constraints.
 noImpCNodesval not to extend element selection to constraints that allow implicit slave detection. Set to 1 or use the token without value to keep rigid selection, set to 2 to keep rigid elements that are declared in Case as ususal constraints.
% Call to extract a submodel from a model model=demosdt('demoubeam'); mo1=feutilb('submodel',model,'innode{x<.5}'); feplot(mo1)
SurfaceAsQuad[,Group]#
This command handles posttreatment of surfaces selections.
The syntax is mo1=feutilb('SurfaceAsQuad',model,eltsel)', where
 model is a standard SDT model, that will be transformed
 eltsel (optional) is a FindElt string that allows a subselection of the initial mesh. The selection should return a face selection, so that the command & selface will be added to the FindElt string if the token selface is missing. If omitted this is set to selface.
 SurfaceAsQuad command transforms a mesh into a surface quad4 elements. A mesh surface selection is first performed, triangle surfaces are then transformed intro degenerated quad4 elements, and second order surfaces are linearized. The output model is then a quad4 surface mesh.
 SurfaceAsQuadGroup angle command splits surfaces based on sharp edges detection. A mesh surface selection is first performed.
The detection is based on angles between element edges on a surface selection, the threshold is given by angle in degrees, if omitted, the default value of 36.87 degrees is taken (corresponding to a cosine value of 0.8). The output model is then a surface mesh divided into groups of surfaces separated by sharp edges. The following command options can be used
 set asks not to transform the model, but to generate a metaset defining the surfaces separated by sharp edges.
 setold asks not to transform the model, but to generate a FaceId set with a connectivity matrix.
 isFaceSel asks not to alter the eltsel command even if the token selface is missing. This is useful if one works with a volume based surface selection, not to loose the face identifiers.
The following sample calls illustrate the syntax and the command outputs:
% SurfaceAsQuad, transform mesh into quad4 surface model=femesh('testtetra4'); % sample volume mesh mo1=feutilb('SurfaceAsQuad',model); % transform into surface quad4 mesh feutil('info',mo1)% SurfaceAsQuadGroup, post treat surface selection based on sharp edges model=femesh('testtetra4'); % sample volume mesh % Generate the surface mesh with group division by sharp edges mo1=feutilb('surfaceasquadgroup 90',model); cf=feplot(mo1); fecom(cf,';colordatagroup;viewn++;');
% Generate a metaset named face of FaceId divided by sharp edges model=feutilb('surfaceasquadgroup90 set"face"',model); data=stack_get(model,'set','face','get'); data.SetNames % names of splitted face selections
SurfaceSplitDef#
This command builds a deformation curve with associated colormap that localizes areas in a model, based on a curve result.
d1=feutilb('SurfaceSplitDef',model,def,RO) returns a deformation curve based on def with zeros for nonlocalized areas and connectivity levels to a starting area. model is an SDT model providing the mesh topology, def is a curve based on which areas will be localized and RO is a running option structure with fields
 .elt a boolean telling whether one works with nodes (false) or elements (true).
 .tol that provides a criterion that defined the areas located from initial positions, this is set be default to 0.1.
 .starts that provides a starting point for the area localization. Depending on field .elt this is either a list of nodes or elts, or a string with a command field. Command maxN is supported and used as a starting list the N first maximum values in the curve.
 .sel provides a FindElt string that restricts the initial selection for the clustering.
This command uses the feutilb @levNodeCon object.
% SurfaceSplitDef example % demonstration model demosdt('demoubeam') cf=feplot; def=cf.def; [~,cf.mdl.Elt]=feutil('eltidfix;',cf.mdl);% Node based field, node clustering d1=feutilb('surfacesplitdef',cf.mdl,def,struct('tol',.5,'starts','max2')); cf.def=d1; fecom colordataa ii_plp('colormap',struct('map',jet(2), ... 'cval',[0 .01 1],'Band',0,'refine',10,'bSplit',2))
% Element based field Ek=fe_stress('ener MatDes 1 curve',cf.mdl,def); % Element clustering d2=feutilb('surfacesplitdefelt',cf.mdl,Ek,struct('tol',.2,'starts','max2')); cf.def=def; fecom('colordataelt',d2); colormap(cf.ga,jet);
SurfVisible#
This command provides visible elements from a particular feplot view.
[eltind,elt,eltindWithHeaders]=feutilb('SurfaceVisible',cf); will output the indices eltind or with headers in cf.mdl.Elt that are currently visible in the display. The second output elt are the face elements consitituting the visible model skin.
This function is compatible but not conforming to feutil FindElt command. When outputting elements of different nature than for the model, the base FindElt commands will provide empty indices. This function still outputs the visible elements indices of the base model to allow further manipulations.
The following command options are available, either in the input string or in an additionnal running options structure.
 not to output invisible elements instead.
 initsel to provide an initial selection to peform with feplot prior to detection.
 cv to provide custom camera postions, as a matrix list of CameraTarget, CameraPosition, CameraUpVector;... values. One line per configuration, the output will provide the union of visible elements per view.
 rval to provide a pciture resolution for the dectection algorithm.
% Recovering visible elements from a feplot display model=demosdt('demoubeamnoplot'); % demo model % tweak its position model.Node=basis('gnode','rx=45;ry=45;rz=45;',model.Node); % display in feplot cf=feplot(model); % choose a view fecom(cf','view2'); % Recover visible elements [ind,elt,i1]=feutilb('SurfVisible',cf); % restrain view to visible elements cf.sel='@feutilb(''SurfVisible'',cf)';
SurfWjNode#
This command provides nodal weights for node based surface integration. The weights are computed as the sum of each element weight contribution using node integration rules.
r1=feutilb('SurfWjNode',model,sel);. model is a standard SDT model, sel is a selection that must provide face elements. If omitted sel is set to selface, one can provide an empty sel is the model is already using shells or the resultof face selection itself. The output r1 is a structure with fields .ID and .wjdet respectively providing the NodeId and associated surface weights on the given surface.
TKT[,dTKT,TKTSolve]#
Optimized matrix projection utilities. This family of commands provides optimized operations obtained through compiled functionalities, and supports out of core, compatible with the sdthdf formats.
 TKT, K = feutilb('tkt',T,K) is the functional equivalent to T'*k*T. K may be a cell array of matrices, in which case one operates on each cell of the array.
 dTKT, r1 = feutilb('dtkt',T,K) is the functional equivalent to diag(T'*k*T) K may be a cell array of matrices, in which case one operates on each cell of the array, the output is then a matrix with the diagonal of each projected matrix on each column.
 TKTSolve, K = feutilb('tkt',T,K,b) is the functional equivalent to T*((T'*k*T) \(T'*b)) that performs a direct resolution with constraints, resolution is called with ofact.
For real bases T, support for RAM footprint optimization is provided through the use of blockwise operations, this can be controlled by the preference BlasBufSize providing a block size in GB. This can be set to Inf to alleviate the behavior. It can be set using sdtdef sdtdef('BlasBufSize',2).
For very large bases T stored in v_handle format through sdthdf command TKTMinRead allows performing blockwise operations on every matrix K at once to limit disc I/O access when loading T. The block sizes are driven by preference OutOfCoreBufferSize providing a memory limit in MB.
Write#
feutilb('WriteFileName.m',model) writes a clean output of a model to a script. Without a file name, the script is shown in the command window.
feutilb('_writeil',model) writes properties. feutilb('_writepl',model) writes materials.
Note that this command automatically overwrites existing script files
@levNodeCon#
Internal node connectivity object that can be created through its constructor levNodeCon accessed trhough conn=feval(feutilb('@levNodeCon'),[],model);.Note that this call is case sensitive.
The packaged functionalities allow browsing nodes or elts based on element edge levelled connectivity. By default, the node connectivity is initialized only, but one can activate element connectivity with token econ in the construction. conn=feval(feutilb('@levNodeCon'),[],model,'econ');].
Alternative commands allow node/elt expansion based on threholds associated to external data (e.g. an energy curve)
The following methods are available
 expN2Lev. Expands a node list to the node list that is connected up to a given connectivity level. n2=feval(conn.expN2Lev,conn,[n1; ...]lev); returns a two column matrix whose column respectively provide the NodeId list and the connectivity level from the initial list. conn is the connectivity object, [n1;...] is a column vector of starting NodeId, lev is the maximum connectivity level allowed.
 expE2Lev. Expands an element list to the elemnt list that is connected up to a given connectivity level. elid2=feval(conn.expN2Lev,conn,[elid1; ...]lev); returns a two column matrix whose column respectively provide the EltId list and the connectivity level from the initial list. conn is the connectivity object, [eltid1;...] is a column vector of starting EltId, lev is the maximum connectivity level allowed.
 expN2Thr. Generates a node list from a starting list that is incrementally increased by connectivity level so that the final list verifies a given criterion. The criterion is based on a threshold to a quantity to increases with the number of nodes, for example an absolute displacement field or an energy field. n3=feval(conn.expN2Thr,conn,n1,curve,tol);. n1 is the initial list of nodes, curve is a data set with fields
 .data is the data field with as many lines as nodes or elements in the model and as many columns as needed.
 .ID or .EltId is in coherence with the number of lines of field .data and provides either the corresponding NodeId for the .ID field or EltId for the .EltId field.
 CritFcn is a criterion function that provides a scalar representative of the value associated to the current node or element list. This is set by default to crit=feutilb('@scalarCrit'), the function is called as val=crit(opt,ind) with ind the indices to be taken on field .data. This function should rethrow a positive value increasing with the number of nodes. The list incrementation is stopped once val>tol.
 expE2Thr Generates an element list from a starting list that is incrementally increased by connectivity level so that the final list verifies a given criterion. See method expN2Thr for the curve input and criterion function formats.
 getNodes Returns the nodes listed in the conn object.
% levNodeConn object example node or elt list by connectivity demosdt('demoubeam') cf=feplot; def=cf.def; % object initialization conn=feval(feutilb('@levNodeCon'),[],cf.mdl,'econ'); % init start=1; % eltid 1 eltid=feval(conn.expE2Lev,conn,start,5); % levEltCon data=struct('EltId',eltid(:,1),'data',eltid(:,2)); fecom('colordataelt',data); % sample call with ndoes n2=feval(conn.expN2Lev,conn,[125],2);
@unConSel#
Internal method whose function handle can be obtained for external use by unConSel=feutilb('@unConSel');.Note that this call is case sensitive.
sel=feval(feutilb('@unConSel'),model); returns a cell array of EltId vectors respectively constituting an unconnected mesh region of the model. The length of the selection is then the number of disconnected mesh regions in the model. This command does not take constraints into account. One has the possibility to work on a model on which constraints have been penalized using command feutilb CaseC2SE.