octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: fem-fenics


From: Marco Vassallo
Subject: RE: fem-fenics
Date: Fri, 5 Jul 2013 22:54:53 +0200

> Subject: Re: fem-fenics
> From: address@hidden
> Date: Fri, 5 Jul 2013 09:58:41 +0200
> To: address@hidden
> CC: address@hidden
>
>
> 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.
Hi,

these seems to be very useful test, thanks.
I would also like to test them against bim with something like:

A_bim = bim2a_advection_diffusion (mesh, 1, 1, 1, 0);
A_fem = fem_bilinearForm (V, V, bc, "Laplace");
assert(A_bim, A_fem);
>
> 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.

for some of the other methods which we should write,
I can hardly imagine a test different from the main code..
For example,
I don't know what I could test over a FunctionSpace..

V  = FunctionSpace (mshd, "Laplace");
 

For the mesh class at the moment I have just implemented the method which initializes the mesh
from a dolfin.xml mesh or from a (p, e ,t) format, because I assume that the mesh objects are manipulated
using the msh pkg.

Marco

>
> > Thanks
> > Marco
>
> c.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]