Mercurial > repos > public > sbplib
annotate +scheme/Scheme.m @ 1298:0ffb5bfa65e4 feature/boundary_optimized_grids
Improve comments
author | Vidar Stiernström <vidar.stiernstrom@it.uu.se> |
---|---|
date | Tue, 07 Jul 2020 16:23:44 +0200 |
parents | 5afc774fb7c4 |
children |
rev | line source |
---|---|
185
fad5e81389c1
Updated comments and definition to use introduced grid types.
Jonatan Werpers <jonatan@werpers.com>
parents:
178
diff
changeset
|
1 % Start with all matrix returns. When that works see how we should generalize |
fad5e81389c1
Updated comments and definition to use introduced grid types.
Jonatan Werpers <jonatan@werpers.com>
parents:
178
diff
changeset
|
2 % to non-matrix stuff/nonlinear |
0 | 3 classdef Scheme < handle |
4 properties (Abstract) | |
5 order % Order accuracy for the approximation | |
6 | |
185
fad5e81389c1
Updated comments and definition to use introduced grid types.
Jonatan Werpers <jonatan@werpers.com>
parents:
178
diff
changeset
|
7 grid |
0 | 8 |
9 D % non-stabalized scheme operator | |
10 H % Discrete norm | |
11 end | |
12 | |
13 methods (Abstract) | |
185
fad5e81389c1
Updated comments and definition to use introduced grid types.
Jonatan Werpers <jonatan@werpers.com>
parents:
178
diff
changeset
|
14 % Closure functions return the opertors applied to the own doamin to |
fad5e81389c1
Updated comments and definition to use introduced grid types.
Jonatan Werpers <jonatan@werpers.com>
parents:
178
diff
changeset
|
15 % close the boundary Penalty functions return the opertors to force |
fad5e81389c1
Updated comments and definition to use introduced grid types.
Jonatan Werpers <jonatan@werpers.com>
parents:
178
diff
changeset
|
16 % the solution. In the case of an interface it returns the operator |
fad5e81389c1
Updated comments and definition to use introduced grid types.
Jonatan Werpers <jonatan@werpers.com>
parents:
178
diff
changeset
|
17 % applied to the other doamin. In some cases the penalty return value |
fad5e81389c1
Updated comments and definition to use introduced grid types.
Jonatan Werpers <jonatan@werpers.com>
parents:
178
diff
changeset
|
18 % can be ommited and the closure function take care of both parts. |
fad5e81389c1
Updated comments and definition to use introduced grid types.
Jonatan Werpers <jonatan@werpers.com>
parents:
178
diff
changeset
|
19 % boundary is a string specifying the boundary e.g. |
fad5e81389c1
Updated comments and definition to use introduced grid types.
Jonatan Werpers <jonatan@werpers.com>
parents:
178
diff
changeset
|
20 % 'l','r' or 'e','w','n','s'. |
fad5e81389c1
Updated comments and definition to use introduced grid types.
Jonatan Werpers <jonatan@werpers.com>
parents:
178
diff
changeset
|
21 % type is a string specifying the type of |
fad5e81389c1
Updated comments and definition to use introduced grid types.
Jonatan Werpers <jonatan@werpers.com>
parents:
178
diff
changeset
|
22 % boundary condition if there are several. |
fad5e81389c1
Updated comments and definition to use introduced grid types.
Jonatan Werpers <jonatan@werpers.com>
parents:
178
diff
changeset
|
23 % neighbour_scheme is an instance of Scheme that should be |
fad5e81389c1
Updated comments and definition to use introduced grid types.
Jonatan Werpers <jonatan@werpers.com>
parents:
178
diff
changeset
|
24 % interfaced to. |
fad5e81389c1
Updated comments and definition to use introduced grid types.
Jonatan Werpers <jonatan@werpers.com>
parents:
178
diff
changeset
|
25 % neighbour_boundary is a string specifying which boundary to |
fad5e81389c1
Updated comments and definition to use introduced grid types.
Jonatan Werpers <jonatan@werpers.com>
parents:
178
diff
changeset
|
26 % interface to. |
220
5df8d20281fe
Made scheme boundary_condition return a cell array of penalties if there are several of them.
Jonatan Werpers <jonatan@werpers.com>
parents:
213
diff
changeset
|
27 % penalty may be a cell array if there are several penalties with different weights |
568
12ee11893453
Add todo about method name change
Jonatan Werpers <jonatan@werpers.com>
parents:
539
diff
changeset
|
28 [closure, penalty] = boundary_condition(obj,boundary,type) % TODO: Change name to boundaryCondition |
905
459eeb99130f
Include type as (optional) input parameter in the interface method of all schemes.
Martin Almquist <malmquist@stanford.edu>
parents:
568
diff
changeset
|
29 |
945
af397cc35239
Update abstract scheme class
Jonatan Werpers <jonatan@werpers.com>
parents:
910
diff
changeset
|
30 % type -- sets the type of interface, could be a string or a struct or something else |
af397cc35239
Update abstract scheme class
Jonatan Werpers <jonatan@werpers.com>
parents:
910
diff
changeset
|
31 % depending on the particular scheme implementation |
af397cc35239
Update abstract scheme class
Jonatan Werpers <jonatan@werpers.com>
parents:
910
diff
changeset
|
32 [closure, penalty] = interface(obj,boundary,neighbour_scheme,neighbour_boundary,type) |
0 | 33 |
1001
514a98f9f90d
Add getBoundaryOperator and getBoundaryQuadrature as abstract methods in scheme.Scheme
Jonatan Werpers <jonatan@werpers.com>
parents:
945
diff
changeset
|
34 op = getBoundaryOperator(obj, opName, boundary) |
514a98f9f90d
Add getBoundaryOperator and getBoundaryQuadrature as abstract methods in scheme.Scheme
Jonatan Werpers <jonatan@werpers.com>
parents:
945
diff
changeset
|
35 H_b= getBoundaryQuadrature(obj, boundary) |
537
a70d5387d2ca
Add note about a possible getBoundaryOperator method
Jonatan Werpers <jonatan@werpers.com>
parents:
220
diff
changeset
|
36 |
185
fad5e81389c1
Updated comments and definition to use introduced grid types.
Jonatan Werpers <jonatan@werpers.com>
parents:
178
diff
changeset
|
37 % Returns the number of degrees of freedom. |
fad5e81389c1
Updated comments and definition to use introduced grid types.
Jonatan Werpers <jonatan@werpers.com>
parents:
178
diff
changeset
|
38 N = size(obj) |
0 | 39 end |
200
ef41fde95ac4
Merged feature/grids into feature/beams.
Jonatan Werpers <jonatan@werpers.com>
diff
changeset
|
40 end |