-
Notifications
You must be signed in to change notification settings - Fork 3
/
fejacob2.m
26 lines (23 loc) · 915 Bytes
/
fejacob2.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
function [jacob2]=fejacob2(nnel,dhdr,dhds,xcoord,ycoord)
%------------------------------------------------------------------------
% Purpose:
% determine the Jacobian for two-dimensional mapping
%
% Synopsis:
% [jacob2]=fejacob2(nnel,dhdr,dhds,xcoord,ycoord)
%
% Variable Description:
% jacob2 - Jacobian for one-dimension
% nnel - number of nodes per element
% dhdr - derivative of shape functions w.r.t. natural coordinate r
% dhds - derivative of shape functions w.r.t. natural coordinate s
% xcoord - x axis coordinate values of nodes
% ycoord - y axis coordinate values of nodes
%------------------------------------------------------------------------
jacob2=zeros(2,2);
for i=1:nnel
jacob2(1,1)=jacob2(1,1)+dhdr(i)*xcoord(i);
jacob2(1,2)=jacob2(1,2)+dhdr(i)*ycoord(i);
jacob2(2,1)=jacob2(2,1)+dhds(i)*xcoord(i);
jacob2(2,2)=jacob2(2,2)+dhds(i)*ycoord(i);
end