precice / systemtests

Testing preCICE / solver combinations using Docker
GNU General Public License v3.0
3 stars 4 forks source link

Test NP in fenicsadapter #100

Open BenjaminRodenberg opened 4 years ago

BenjaminRodenberg commented 4 years ago

https://github.com/precice/fenics-adapter/pull/42 introduces nearest projection (NP) in the fenicsadapter. We already have a test case, where heat.py is run:

https://github.com/precice/systemtests/blob/92a2d96de651986b4a651cb923faf4ab421973a6/tests/TestCompose_fe-fe.Ubuntu1804.home/docker-compose.yml#L12

and

https://github.com/precice/systemtests/blob/92a2d96de651986b4a651cb923faf4ab421973a6/tests/TestCompose_fe-fe.Ubuntu1804.home/docker-compose.yml#L27

In this test case, the LEFT part of the domain (Dirichlet problem = receives temperature from right part of the domain as Dirichlet BC) has a low resolution, while the RIGHT part of the domain has a high resolution. Here, Nearest neighbor (NN) is sufficient, since the temperature values that LEFT receives from RIGHT are exact anyway: no mapping is needed, since the nodes coincide. The situation is different for RIGHT: here interpolation is required. However, since the heat flux that RIGHT receives is constant along the whole coupling edge, NN does not introduce an error.

https://github.com/precice/fenics-adapter/pull/42 already provides a good test case: If LEFT uses a high resolution and RIGHT a course one, we need a higher order interpolation scheme (=NP) in order to not introduce any error, when the temperature is mapped from RIGHT to LEFT. We should implement this test and make sure that:

  1. if NN is used the test fails and
  2. if NP is used the test succeeds
BenjaminRodenberg commented 4 years ago

This code snippet might help to automatically generate fitting right-hand-sides for a given manufactured solution.