-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCStaticSolution.m
More file actions
54 lines (42 loc) · 1.44 KB
/
CStaticSolution.m
File metadata and controls
54 lines (42 loc) · 1.44 KB
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
43
44
45
46
47
48
49
50
51
52
53
classdef CStaticSolution
%CMesh
% Brief: Main class used to calculate the static solution
% Author: S.Ramon
% Version: 0.0.1
properties
u
f
end
methods
function object = CStaticSolution( Mesh, InitialData, K )
if nargin > 0
xpoints = Mesh.xpoints;
T = Mesh.T;
nnodepelem = Mesh.nnodepelem;
nelem = Mesh.nelem;
nnode = Mesh.nnode;
ndofpn = Mesh.ndofpn;
postProcessing = InitialData.StaticPost;
D = InitialData.D;
N = InitialData.N;
uD = InitialData.uD;
fN = InitialData.fN;
KDD = K(D,D);
KDN = K(D,N);
KND = K(N,D);
KNN = K(N,N);
uN = KNN\(fN-KND*uD);
fD = KDD*uD+KDN*uN;
object.u(N) = uN;
object.u(D) = uD;
object.f(N) = fN;
object.f(D) = fD;
if postProcessing
PostProcessing = CPostProcessing('data/Static',1);
PostProcessing.toGID ( xpoints(:,1:3), T, nnodepelem, nelem, nnode );
PostProcessing.toGIDPost( nnodepelem, ndofpn, 1, object.u );
end
end
end
end
end