← Back to team overview

dolfin team mailing list archive

[HG DOLFIN] Changed syntax of constant vector and tensor functions to use Array.

 

One or more new changesets pushed to the primary dolfin repository.
A short summary of the last three changesets is included below.

changeset:   4380:1d6869e94def00a759eb52388443f606781d108c
tag:         tip
user:        "Martin Sandve Alnæs <martinal@xxxxxxxxx>"
date:        Mon Jul 07 11:12:16 2008 +0200
files:       dolfin/function/ConstantFunction.cpp dolfin/function/ConstantFunction.h dolfin/function/Function.cpp dolfin/function/Function.h dolfin/swig/dolfin_common_post.i dolfin/swig/dolfin_function_pre.i site-packages/dolfin/__init__.py
description:
Changed syntax of constant vector and tensor functions to use Array.
The following are equivalent and generalizes in the obvious way:

Function(mesh, 2, 0.0);

Array<real> values(0.0, 0.0);
Function(mesh, values);

Array<uint> shape(2);
Array<real> values(0.0, 0.0);
Function(mesh, shape, values);

In Python, the typemaps doesn't seem to pick up lists,
so the corresponding syntax there is currently:

f = Function(mesh, 2, 0.0)

f = Function(mesh, ArrayDouble(0.0, 0.0))

f = Function(mesh, ArrayUInt(2), ArrayDouble(0.0, 0.0))


changeset:   4379:a44f5d31503e454ddf06112654a529454aeb04dd
user:        "Garth N. Wells <gnw20@xxxxxxxxx>"
date:        Mon Jul 07 09:48:51 2008 +0100
files:       doc/misc/policy
description:
Add point on brackets following control statements to policy.


changeset:   4378:01039869ddba21eb64800aef6863006ff84e7ca2
user:        "Martin Sandve Alnæs <martinal@xxxxxxxxx>"
date:        Fri Jul 04 14:51:57 2008 +0200
files:       dolfin/la/EpetraVector.cpp dolfin/la/EpetraVector.h dolfin/la/uBlasVector.cpp dolfin/la/uBlasVector.h
description:
Cleanup in EpetraVector safety checks (using if(!x) instead of dolfin_assert most places, keeping the check in release builds).
Implemented get,set,add in a crude, non-parallell way.

----------------------------------------------------------------------
For more details, visit http://www.fenics.org/hg/dolfin