<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Dear all,</p>
<p>i managed to do the gradient outputs for the components of the
PowerGFS<br>
by writing an aditional discrete Gridfunction which is compatible
with the adapters.<br>
I am not sure if it is clean enough to make it into the gfs
utilities header, but <br>
for closure I want to report it here. (see attached header)<br>
<br>
Michael<br>
</p>
<div class="moz-cite-prefix">On 14.11.19 15:36, Michael Wenske
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:d1c0c3ba-d547-8d1d-3a0d-f9c571b2a6fc@wwu.de">
<pre class="moz-quote-pre" wrap="">Dear wizards,
i am working on a system of one or two (or more) reaction-diffusion
equations. I successfully
refactored my codebase to use the PowerGridfunctionSpace for this
application.
This way I can extend my system to more fields, or fall back to the
simple one-equation case.
I can switch between a PowerGFS of size 1 (one equation), and size 2
(two coupled equations),
and export the results to VTK. So far so good.
Now I want to inspect the gradients of my field(s). In the normal case
without the PowerGFS,
I could make use of the functionality of DiscreteGridFunctionGradient,
and then use the VTK adapter to write the gradient. This is very convenient!
How do I go about this when using a PowerGFS? I fail to get it to work
even for the
one-component PowerGFS. For the two component fields I can use the class
VectorDiscreteGridFunction<..,size>, and force the return types size
with the last
template argument. The class VectorDiscreteGridFunctionGradient does not
seem
to have that option. Here, in the case where the powerGFS has size one, the
Adapters can not convert the one-component Fieldvector to double (I think).
I tried a different route of extracting the sub-GFS-Type from the
PowerGFS and
create a handle on the first components subspace. The idea was to use
use the existing
functionality of the DGF's and adapters on the subGFS, but I also run
into problems.
How would I extract the (smaller) coefficient vector from the larger
PowerGFs one?
I figure that this might be interesting for other applications too,
where the GFS-Tree
might be even more complex than in my case.
I am attaching a minimal working example (dune module) which outputs the
two component fields
sucessfully. The parts where I horribly fail to output the gradients of
the first component are
commented, starting from line 107. I would appreciate any hints or
insights on how to do this.
Am I missing something? What would be the dune way to do this?
build with:
./dune-common/bin/dunecontrol --opts=./dune-powerGFS-output/debug_opts
--only=dune-powerGFS-output all
I am working on dune 2.6
thanks in advance!
Michael
</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
dune-pdelab mailing list
<a class="moz-txt-link-abbreviated" href="mailto:dune-pdelab@lists.dune-project.org">dune-pdelab@lists.dune-project.org</a>
<a class="moz-txt-link-freetext" href="https://lists.dune-project.org/mailman/listinfo/dune-pdelab">https://lists.dune-project.org/mailman/listinfo/dune-pdelab</a></pre>
</blockquote>
</body>
</html>