I think I got it working. I used the version of eval which passes in Data arguement.
On Sun, Jun 14, 2009 at 6:45 PM, Jehanzeb Hameed<jhame...@illinois.edu> wrote: > I want to do evaluate a form like this, arising from poisson equation > with variable coefficient: > > k * dot(grad(v),grad(u))*dx > > > To do this, I define k as > > cellElement = FiniteElement("Discontinuous Lagrange", "triangle", 0) > > k = Function(cellElement) > > Now I want to define values of k dependent on material type of cell. > This is the link I cant figure out how to do. > > -Jehanzeb > > On Sun, Jun 14, 2009 at 5:50 PM, Jehanzeb Hameed<jhame...@illinois.edu> wrote: >> I am still struggling with this.... >> >> I am trying to store subdomain identifiers in meshdata object, so that >> they get updated when the mesh is refined. To do this, I have a file, >> mesh.xml. In that file, there is a tag named "data". The "data" tag >> has a child "array" with name = "material indicators". So, now when I >> create mesh, will my meshdata have this array? >> >> And how do I create cell dependent functions. The example in Dolfin >> user manual seems outdated. I think I need to use UFCfunction, but >> what do I pass as Function arguement to its constructor (if >> UFCfunction is indeed the correct way to go). >> >> -Jehanzeb >> >> On Thu, Jun 11, 2009 at 11:55 AM, Bartosz Sawicki<sawic...@iem.pw.edu.pl> >> wrote: >>> Jehanzeb Hameed wrote: >>>> >>>> Hello, >>>> >>>> I am new to Dolfin, and was wondering how subdomains are supported as >>>> regards to mesh reading and refinement. In my case, I will have a >>>> mesh, with 2 subdomains. Each cell has an identifier indicating which >>>> domain it belongs to. Looking at the examples, it seems I will need to >>>> store domain identifiers in a separate xml file. Is that correct? >>> >>> Subdomain identifiers can be stored in different ways, as a separate >>> MeshFunction, or in the MeshData structure. >>> I prefer MeshData, because it is directly included in the Mesh object. >>> You can also store boundary indicators using MeshData structure, see >>> demo/pde/bcs. >>> >>>> With regard to mesh refinement, I assume I will be able to define >>>> subdomains for each domain based on cell identifiers. Now, when I >>>> refine the mesh, will the subdomains also be updated (i.e. will dolfin >>>> know what domain the new cells belong to) ? >>> >>> If you name your MeshFunction "material indicators" it will be transformed >>> to follow refined mesh. Arrays which store boundary indicators will be >>> updated too. >>> See LocalMeshRefinement::transformMeshData() >>> >>>> Also, is there a way to read archives of this list? >>> >>> Yes, there is http://www.fenics.org/pipermail/dolfin-dev/ >>> >>> regrds. >>> BArtek >>> >>> >>>> >>>> Thanks, >>>> -Jehanzeb >>>> _______________________________________________ >>>> DOLFIN-dev mailing list >>>> DOLFIN-dev@fenics.org >>>> http://www.fenics.org/mailman/listinfo/dolfin-dev >>> >>> >> > _______________________________________________ DOLFIN-dev mailing list DOLFIN-dev@fenics.org http://www.fenics.org/mailman/listinfo/dolfin-dev