From: Benjamin S. K. <be...@cf...> - 2003-11-19 18:27:03
|
Sure... What you want to use is the Monomials family instead of the Lagrange family. The Lagrange basis functions assume values at the nodes and are C0 continuous. The monomials only have DOFs associated with the element and have no continuity. Try the following: FEType fe_type (CONST, MONOMIAL); Eq("Laplace").add_variable("u", fe_type); The other add_variable member assumes Lagrange elements. I mau make an option soon that will work like this: add_variable ("u", CONST, MONOMIAL); -Ben Buffat Marc wrote: >Hello, >I am currently testing the libmesh library. >I have a research project to develop an unstructured FiniteVolume CFD code >using mesh refinement. The approximation use constant value per element >(Finite volume), i.e. a P0 (constant) approximation per element. >Is it possible to use P0 element, i.e. element with 1 dof per element (and no >dof per node) with libmesh. >Actually I can build the mesh and compute values per elements using >vector class in sequential. >But I cannot use the Equationsystem class which do not accept CONST Lagrange >F.E. > >code like >... >EquationSystems Eq(geo); > { > Eq.add_system<SteadySystem> ("Laplace"); > Eq("Laplace").add_variable("u", CONST); > Eq("Laplace").attach_assemble_function (assemble); > Eq.init(); > Eq.print_info(); > } >.. >produce a runtime error >[0] src/fe/fe_lagrange.C, line 526, compiled Nov 19 2003 at 17:30:01 >Abandon >whereas the same code with FIRST instead of CONST works. > >Any Idea or advice are welcome? >If the P0 Lagrange is not available yet, is it complicated to include it ? >Thanks > Marc > > > |