Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project!

## Re: [Libmesh-users] Discontinuous Galerkin in DiffSystem

 Re: [Libmesh-users] Discontinuous Galerkin in DiffSystem From: Truman Ellis - 2011-07-01 16:02:28 ```> FEMContext::elem->neighbor(FEMContext::side) is the neighboring > element. So this will give me an Elem * pointer, which looks like the geometry of the element, but I can't figure out how to get the appropriate FEType to build a FEBase. The Elem::type() function only returns the inherited ElemType, e.g. Quad9. How do I go from a pointer to the neighboring Elem to building a new FEBase? Won't FEMContext only give my the FEType of my current element? Thanks, -- Truman Ellis ```

### Thread view

 [Libmesh-users] Discontinuous Galerkin in DiffSystem From: Truman Ellis - 2011-06-30 14:28:15 ```I am trying to implement discontinuous Galerkin to solve the Laplace equation using DiffSystem. Example 21 solves the same problem via the older equation_system method. How do I access neighbor information using the DiffSystem framework, specifically to calculate jumps and averages for calculating fluxes? Thanks, -- Truman Ellis ```
 Re: [Libmesh-users] Discontinuous Galerkin in DiffSystem From: Roy Stogner - 2011-06-30 15:44:04 ```On Thu, 30 Jun 2011, Truman Ellis wrote: > How do I access neighbor information using > the DiffSystem framework, FEMContext::elem->neighbor(FEMContext::side) is the neighboring element. > specifically to calculate jumps and averages for calculating fluxes? Currently that's only possible by doing things the same way as non-DiffSystem codes: build a new FEBase (you can get the right type from the FEMContext), initialize it on the neighbor with the inverse_map'ed xyz values that the first FEBase gave you, and calculate values and gradients from that. It would probably be straightforward to fold that code into FEMSystem/FEMContext in the library, though, with a per-variable boolean to determine which variables needed jump information... my suggestion would be to start with it in user code for this DG Poisson system you're trying to get familiar with the APIs, then we'll move it to library code and use that trial system for regression testing, and then you'll have the facility already up and will have the same capability already available for more complex formulations. --- Roy ```
 Re: [Libmesh-users] Discontinuous Galerkin in DiffSystem From: Truman Ellis - 2011-07-01 16:02:28 ```> FEMContext::elem->neighbor(FEMContext::side) is the neighboring > element. So this will give me an Elem * pointer, which looks like the geometry of the element, but I can't figure out how to get the appropriate FEType to build a FEBase. The Elem::type() function only returns the inherited ElemType, e.g. Quad9. How do I go from a pointer to the neighboring Elem to building a new FEBase? Won't FEMContext only give my the FEType of my current element? Thanks, -- Truman Ellis ```
 Re: [Libmesh-users] Discontinuous Galerkin in DiffSystem From: Roy Stogner - 2011-07-01 16:16:27 ```On Fri, 1 Jul 2011, Truman Ellis wrote: > Won't FEMContext only give my the FEType of my current element? The FEType is constant for any given variable. Even in the case of p refinement the FEType merely encodes the minimum-p case's type, and reinit functions then examine the p refinement level of each element to get the effective FE type to use. --- Roy ```