-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnot2dy.m
42 lines (40 loc) · 1.07 KB
/
not2dy.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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
function dy = not2dy ( x1, y1, x2, y2, x3, y3, x4, y4 )
%*****************************************************************************80
%
%% NOT2DY evaluates a factor for serendipity basis functions.
%
% Discussion:
%
% not2(x1,y1,x2,y2,x3,y3,x4,y4) evaluates at the point (x1,y1), the basis
% factor that is 0 at (x2,y2) and (x3,y3) and 1 at (x4,y4):
%
% ( ( x1 - x2 ) * ( y3 - y2 ) - ( x3 - x2 ) * ( y1 - y2 ) )
% / ( ( x4 - x2 ) * ( y3 - y2 ) - ( x3 - x2 ) * ( y4 - y2 ) )
%
% not2dy returns the derivatives of this function with respect to Y1.
%
% Licensing:
%
% This code is distributed under the GNU LGPL license.
%
% Modified:
%
% 28 June 2014
%
% Author:
%
% John Burkardt
%
% Parameters:
%
% Input, real X1, Y2, the evaluation point.
%
% Input, real X2, Y2, X3,Y3, values that define the factor.
%
% Output, real DY, the derivative of the basis function factor
% with respect to Y1.
%
dy = ( 0.0 - ( x3 - x2 ) * 1.0 ) ...
/ ( ( x4 - x2 ) * ( y3 - y2 ) - ( x3 - x2 ) * ( y4 - y2 ) );
return
end