Mercurial > repos > public > sbplib
annotate +grid/Grid.m @ 774:66eb4a2bbb72 feature/grids
Remove default scaling of the system.
The scaling doens't seem to help actual solutions. One example that fails in the flexural code.
With large timesteps the solutions seems to blow up. One particular example is profilePresentation
on the tdb_presentation_figures branch with k = 0.0005
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Wed, 18 Jul 2018 15:42:52 -0700 |
parents | 763d50caddf3 |
children |
rev | line source |
---|---|
153
7aee9eba3bb8
Added abstract classes for some different types of grids.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
1 classdef Grid < handle |
7aee9eba3bb8
Added abstract classes for some different types of grids.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
2 % General d dimensional grid with n points |
7aee9eba3bb8
Added abstract classes for some different types of grids.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
3 methods (Abstract) |
7aee9eba3bb8
Added abstract classes for some different types of grids.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
4 % n returns the number of points in the grid |
7aee9eba3bb8
Added abstract classes for some different types of grids.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
5 o = N(obj) |
7aee9eba3bb8
Added abstract classes for some different types of grids.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
6 |
7aee9eba3bb8
Added abstract classes for some different types of grids.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
7 % d returns the spatial dimension of the grid |
7aee9eba3bb8
Added abstract classes for some different types of grids.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
8 o = D(obj) |
7aee9eba3bb8
Added abstract classes for some different types of grids.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
9 |
155
cf748f33cd5b
Removed some extra lines, added some notes and comments. Fixed classname.
Jonatan Werpers <jonatan@werpers.com>
parents:
153
diff
changeset
|
10 % points returns a n x d matrix containing the coordinates for all points. |
153
7aee9eba3bb8
Added abstract classes for some different types of grids.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
11 X = points(obj) |
158
685ba6e6c679
Added abstract methods to Grid.
Jonatan Werpers <jonatan@werpers.com>
parents:
155
diff
changeset
|
12 |
685ba6e6c679
Added abstract methods to Grid.
Jonatan Werpers <jonatan@werpers.com>
parents:
155
diff
changeset
|
13 % Restricts the grid function gf on obj to the subgrid g. |
164
772365e2cf96
Correct method signatures in Grid.m
Jonatan Werpers <jonatan@werpers.com>
parents:
158
diff
changeset
|
14 gf = restrictFunc(obj, gf, g) |
158
685ba6e6c679
Added abstract methods to Grid.
Jonatan Werpers <jonatan@werpers.com>
parents:
155
diff
changeset
|
15 |
685ba6e6c679
Added abstract methods to Grid.
Jonatan Werpers <jonatan@werpers.com>
parents:
155
diff
changeset
|
16 % Projects the grid function gf on obj to the grid g. |
164
772365e2cf96
Correct method signatures in Grid.m
Jonatan Werpers <jonatan@werpers.com>
parents:
158
diff
changeset
|
17 gf = projectFunc(obj, gf, g) |
188
c5ca9bbfed41
Added methods to hande boundaries to Grid. Added failing tests and method stubs.
Jonatan Werpers <jonatan@werpers.com>
parents:
182
diff
changeset
|
18 |
527
763d50caddf3
Move the description of boundary identifiers to the grid package and update documentation for grid.Grid.getBoundaryNames
Jonatan Werpers <jonatan@werpers.com>
parents:
188
diff
changeset
|
19 % Return the grid.boundaryIdentifiers of all boundaries in a cell array. |
188
c5ca9bbfed41
Added methods to hande boundaries to Grid. Added failing tests and method stubs.
Jonatan Werpers <jonatan@werpers.com>
parents:
182
diff
changeset
|
20 bs = getBoundaryNames(obj) |
c5ca9bbfed41
Added methods to hande boundaries to Grid. Added failing tests and method stubs.
Jonatan Werpers <jonatan@werpers.com>
parents:
182
diff
changeset
|
21 |
c5ca9bbfed41
Added methods to hande boundaries to Grid. Added failing tests and method stubs.
Jonatan Werpers <jonatan@werpers.com>
parents:
182
diff
changeset
|
22 % Return coordinates for the given boundary |
c5ca9bbfed41
Added methods to hande boundaries to Grid. Added failing tests and method stubs.
Jonatan Werpers <jonatan@werpers.com>
parents:
182
diff
changeset
|
23 b = getBoundary(obj, name) |
153
7aee9eba3bb8
Added abstract classes for some different types of grids.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
24 end |
7aee9eba3bb8
Added abstract classes for some different types of grids.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
25 end |