-
-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How can we create Expression / function representation for boundary conditions properly? #4
Comments
If we take a look at https://github.com/precice/tutorials/issues/13#issuecomment-443029988, we see that RBF functions are not necessarily the ideal choice for interpolation. If we use linear interpolation instead, we need connectivity information and we have to generalize the implementation in f69a016 to support arbitrary coupling interfaces. Currently only straight boundaries that are parallel to the y-axis are supported. Using linear interpolation with connectivity information allows us to use the nearest projection mapping, in the end. This will be helpful for working on https://github.com/precice/tutorials/issues/11. |
Not really. Also, another problem then would be how to convert this interpolant to a description that FEniCS understands.
Can we ask on a FEniCS mailing list? This should be a quite natural feature. Also needed if you want to read boundary conditions from a file etc., so others should also have this problem. This should not be something to implement in the adapter, but directly in FEniCS. |
Another possible approach for creating an interpolant from point data: use (generalized) moving least squares. See work of Paul Kuberry for more details. Compadre toolkit offers a Python Interface and might be useful. |
If we create a piecewise linear interpolant (like e.g. here), this has a major problem: The FEniCS solver always "sees" a piecewise linear function, even if the point data that we interpolate does not originate from such a function. If we, for example, use a second or higher order function space as finite element basis (see here), this will lead to problems like an incorrect flux computation. We should use higher order interpolation instead (see here) to avoid problems. |
In Nutils, we can simply use the Gauss Points of the function. This completely avoids an additional interpolation step inside the adapter. See here. |
The fenics-adapter now provides means for the user to choose between the two strategies RBF interpolation and polynomial interpolation (7afb0e0). |
In #38 FEniCS' More details on this will follow in the thesis of @richahert |
This issue is closed by #83. @richahert 's thesis can be found here: https://mediatum.ub.tum.de/node?id=1520579 |
Our FEniCS adapter uses Expressions to define Dirichlet and Neumann boundary conditions. Since preCICE only provides nodal data, we implemented the class CustomExpression to be able to create a functional representation (an Expression) from nodal data.
In our implementation RBFs are used for interpolation (see eval function). However, this approach is not ideal when considering the whole coupled simulation from a broader perspective:
preCICE already uses interpolation to map data from the coupling partner's mesh to the FEniCS mesh (if the meshes are not matching). However, the interpolant is hidden in preCICE and, therefore, we have to perform an additional interpolation step on the FEniCS side to create an interpolant that may be used by FEniCS for defining boundary conditions.
Some first ideas:
The text was updated successfully, but these errors were encountered: