How about 'Region' ?
-- Marie On 02/12/2014 05:38 PM, Martin Sandve Alnæs wrote:
Examples: # Used in place of Mesh to define integration domain D = Domain(triangle) M = 1*dx(D) # Dolfin version: M = 1*dx(mesh) # Used in place of Mesh to define integration domain D = Domain(triangle) M = 1*dx(domain=D) # Dolfin version: M = 1*dx(domain=mesh) # Used in place of Mesh to define finite element D = Domain(triangle) V = FiniteElement("CG", D, 1) f = Coefficient(V) M = f*dx # Dolfin version: mesh = UnitSquareMesh(9,9) V = FunctionSpace(mesh, "CG", 1) f = Function(V) M = f*dx# Used to distinguish between functions and geometry on different meshes:DA = Domain(triangle, label="A") DB = Domain(triangle, label="B") VA = FiniteElement("CG", DA, 1) VB = FiniteElement("CG", DA, 1) fa = Coefficient(VA) fb = Coefficient(VA) M = (fa+fb)*dQ # Dolfin version: mesha = UnitSquareMesh(9,9) meshb = UnitSquareMesh(3,3) Va = FunctionSpace(mesha, "CG", 1) Vb = FunctionSpace(meshb, "CG", 1) fa = Function(Va) fb = Function(Vb) M = (fa+fb)*dQ# Used to attach coordinate field for high-order geometries (ongoing work):Dx = Domain(triangle) Vx = VectorFiniteElement("CG", Dx, 2) x = Coefficient(Vx) D = Domain(x) V = FunctionSpace(D, "CG", 2) f = Function(V) n = FacetNormal(D) M = f*dx + n[0]*ds # Dolfin version: mesh = UnitSquareMesh(9,9) Vx = VectorFunctionSpace(mesh, "CG", 2) x = Function(Vx) D = Domain(x) V = FunctionSpace(D, "CG", 2) f = Function(V) n = FacetNormal(D) M = f*dx + n[0]*ds In a form that integrates over two meshes, form.domains() today returns (domain1, domain2). I guess that relates to your parts, although they are somewhat related to function spaces as well? The name 'part' doesn't really make sense in all contexts above. MartinOn 12 February 2014 17:12, Anders Logg <[email protected] <mailto:[email protected]>> wrote:On Wed, Feb 12, 2014 at 05:10:17PM +0100, Martin Sandve Alnæs wrote: > It seems I chose a rather unfortunate name for the 'Domain' class in ufl, as > 'domains' is rather overloaded. It's better to change now than later, since it > hasn't seen widespread use yet. > > It's not that I don't like 'Domain', I think it fits well. Its just that a lot > of places 'domain' has been used where 'subdomain' would be more appropriate, > such as mesh.domains() which would be better named mesh.sub_domains(). > > What do people think? How does it relate to "part" that I have been using in the new classes for overlapping meshes? -- Anders _______________________________________________ fenics mailing list [email protected] http://fenicsproject.org/mailman/listinfo/fenics
_______________________________________________ fenics mailing list [email protected] http://fenicsproject.org/mailman/listinfo/fenics
