<< dfemtruss_ana FEMTruss femmode >>

FEMTruss >> FEMTruss > dfemtruss_smw

dfemtruss_smw

Compute the partial derivative of the nodal displacements using the Sherman Morrison Woodbury formula.

Calling Sequence

[U,dU] = dfemtruss_smw(ffd,x,ddl,params)

Parameters

ffd

a function which returns the parameters of a structure. Must have the following prototype:

[t,p,e,A,E,rho,F] = ffd(varargin(1)).

The varargin(1) parameters is optional.

x

the vector of optimization parameters.

ddl

a list of nodes on which we want to compute the partial derivatives.

params

a plist (created using the parameters module) which handles some parameters for the dfemtruss_smw function. Can be:

  • 'delta_h': the size of the finite difference step. Default value: 1e-6

U

the vector of nodal displacement.

dU

partial derivative of the nodal displacement solution (wrt to the points given in x). A matrix of size length(ddl) x length(x).

Description

Compute the partial derivative of the nodal displacements using the Sherman Morrison Woodbury formula.

Examples

// Code sample extracted from demos/brid_optim_smw.sce
// This code will not work if copy / pasted from this help page !

function y=fobj_truss(x)
[t,p,e,A,E,rho,F] = bridge_optim(x);
[U,P,R]= femtruss(bridge_optim, %F, x);

// First objective: minimize the deformation at nodes 2, 3, 4 with respect to y

// The deck of the bridge
Pos_deck = localise2d(IndexNodeVarInf);

y = sqrt(sum(U(Pos_deck).^2));
endfunction

function dy=dfobj_truss(x)
Pos_deck = localise2d(IndexNodeVarInf);
[U,dU] = dfemtruss_smw(bridge_optim,x,Pos_deck);
for i=1:length(x)
  dy(i) = 2*U(Pos_deck) * dU(:,i);
end
endfunction

function [y, dy, ind]=optim_fobj_truss(x, ind)
y  = fobj_truss(x);
dy = dfobj_truss(x)';
endfunction

See Also

Authors


Report an issue
<< dfemtruss_ana FEMTruss femmode >>