On 10/1/19 10:23 AM, Konrad Wiśniewski wrote: > > I'm looking for quick advise. In my calculations I solve two equations (in > 2D) > consecutively: the Poisson equation where I obtain electric field *E*, and > then I solve the continuity equation where I obtain e.g. density of electrons > *n*. I want to get current that is *j* = C*nE* where C is a constant (I need > to use one variable from first and one from second equation). Problem is that > in Poisson equation I've used Raviart-Thomas finite elements and in > Continuity > equation I've used discontinuous elements (FE_DGQ) and the position of dofs > in > this two methods do not coincide with each other (RT dofs are placed on the > faces of a cell when DGQ on the vertexes). My question is: how do you wisely > combine two dof handlers to produce a new variable which I want to visualize > on the same mesh?
The location of nodes for the two elements doesn't actually matter -- everything the DataOut class produces is located at the vertices of the cells. When you say "combine", do you mean that you want to compute the derived quantity using something like a DataPostprocessor? If that's the case, you'll have to create a single DoFHandler that stores both fields (via an FESystem that has both the FE_RT and the FE_DGQ element) and a single solution vector that contains both components of the solution. You can then use a DataPostprocessor. On the other hand, if all you want to do is visualize both fields at the same time, then the easiest may simply be to write the two solutions into their own files, and load both files in Visit or Paraview. > E.g: How to extrapolate the values from RT-elements to vertexes, then for > each > vertex calculate current *j*, and then add current variable to the solution > in > the way that I will be able to visualize it in paraview? This sounds like you want to compute 'j' in a DataPostprocessor and just send the result into a VTK file. > Bonus question: I'm not sure now but I may need to have two different > triangulations in those equations, so even the cells will differ one from > another (however the overall domain will remain the same). How should I deal > with this situation? Output things into separate files and visualize them at the same time. Best W. -- ------------------------------------------------------------------------ Wolfgang Bangerth email: [email protected] www: http://www.math.colostate.edu/~bangerth/ -- The deal.II project is located at http://www.dealii.org/ For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en --- You received this message because you are subscribed to the Google Groups "deal.II User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/40847cbb-68a4-eb95-6fba-2a17aa7fc392%40colostate.edu.
