Mercurial > repos > public > sbplib
comparison +scheme/+bc/forcingSetup.m @ 899:ba10f24bf476 bcSetupExperiment
Fix the documentation of functions
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Sat, 24 Nov 2018 15:48:00 +0100 |
parents | 51cc7b05b4ab |
children | a52033540dd9 |
comparison
equal
deleted
inserted
replaced
895:ba037fd21e9f | 899:ba10f24bf476 |
---|---|
1 % Setup the forcing function for the given boundary conditions and data. | 1 % Setup the forcing function for the given boundary conditions and data. |
2 % Each bc is a struct with the fields | |
3 % * type -- Type of boundary condition | |
4 % * boundary -- Boundary identifier | |
5 % * data -- A function_handle for a function which provides boundary data.(see below) | |
2 % S_sign allows changing the sign of the function to put on different sides in the system of ODEs. | 6 % S_sign allows changing the sign of the function to put on different sides in the system of ODEs. |
3 % default is 1, which the same side as the diffOp. | 7 % default is 1, which the same side as the diffOp. |
8 % Returns a forcing function S. | |
9 % | |
10 % The boundary data function can either be a function of time or a function of time and space coordinates. | |
11 % In the case where it only depends on time it should return the data as grid function for the boundary. | |
12 % In the case where it also takes space coordinates the number of space coordinates should match the number of dimensions of the problem domain. | |
13 % For example in the 2D case: f(t,x,y). | |
14 | |
4 function S = forcingSetup(diffOp, penalties, bcs, S_sign) | 15 function S = forcingSetup(diffOp, penalties, bcs, S_sign) |
5 default_arg('S_sign', 1); | 16 default_arg('S_sign', 1); |
6 | 17 |
7 assertType(bcs, 'cell'); | 18 assertType(bcs, 'cell'); |
8 assertIsMember(S_sign, [1, -1]); | 19 assertIsMember(S_sign, [1, -1]); |