[aspect-devel] Querying Aspect plugins directly from C++

Wolfgang Bangerth bangerth at math.tamu.edu
Mon Nov 18 14:24:16 PST 2013


On 11/18/2013 10:48 AM, Timo Heister wrote:
> Dear Jonathan,
>
> a problem is that a material model can potentially depend on many
> things inside aspect (geometry, etc.) which will be difficult for you
> to reproduce in a separate program.
>
> I would create a .prm that sets up a tiny test problem, does 2 time
> steps, and writes out the results. Then you can compare things like
> the statistics file. If you want to test something specific, you can
> always write a postprocessor that generates a file with the
> information you want (say look up viscosity using representative_point
> and a range of temperatures).
>
> Note that we have a lot of unittests in the tests/ directory that do
> something similar.

As a starting point, take a look at
   tests/shear_thinning.prm
   tests/shear_thinning.cc
that implements a model where
   viscosity = 1 / (1 + norm(eps(u)))
We then simply solve this on a very coarse mesh (=very fast) and 
integrate this viscosity over the entire domain in a postprocessor.

If you use cmake to install aspect, just say
   cmake ...your usual command line...
   ctest
to run all of the tests. The shear thinning test will be one of them. 
Most tests will fail because the output is slightly different from the 
one on our testing machine, but you get the idea.

Best
  W.

-- 
------------------------------------------------------------------------
Wolfgang Bangerth               email:            bangerth at math.tamu.edu
                                 www: http://www.math.tamu.edu/~bangerth/



More information about the Aspect-devel mailing list