[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: fem-fenics
From: |
c. |
Subject: |
Re: fem-fenics |
Date: |
Fri, 5 Jul 2013 09:58:41 +0200 |
On 5 Jul 2013, at 09:29, Marco Vassallo <address@hidden> wrote:
> Hi,
>
> the test for each step should be just the single block which we will later
> include in
> the comprehensive test, or it should be something different and which tests
> the class deeply?
For each step in the development, as defined in your timeline, you should write
enough tests to make shure
what you developed during that step behaves correctly. In a sense the tests you
write should just be a more
precise way of defining the timeline.
so yes, your tests should be something more detailed than
ffc ("Laplace.ufl");
V = FunctionSpace (mshd);
sd = SubDomain (mesh, @(x, y) abs (x - 1.0) < eps);
bc = DirichletBC (V, @(x, y) 0.0, sd);
A = BilinearForm (V, V, bc);
L = linearForm (V, bc);
and morover they should contain assertions that may be used to decide
whether the test is passing or not, e.g.
assert (issymmetric (A), true)
assert (norm (sum (A, 2), inf), eps)
to test that the matrix produced by the assembly is symmetric and its columns
sum to 0.
Ideally each method of each class you implement should have at least one test.
don't worry if either the main test or the smaller ones are not correct from
the beginning,
developement is an iterative process so you will have to refine them as you go.
> Thanks
> Marco
c.
fem-fenics, c., 2013/07/03
- Message not available
- Message not available