Toggle menu
71
399
28
3.6K
Medusa: Coordinate Free Meshless Method implementation
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Customization: Difference between revisions

From Medusa: Coordinate Free Meshless Method implementation
No edit summary
Line 7: Line 7:
TODO
TODO


== Custom operators: Biharmonic equation ==
== Custom operators: Hyperviscosity operator ==
Biharmonic operator $\nabla^4$ is not included in Medusa by default, but it is easy to define.


We solve the problem
Medusa library also allows custom linear operators $ \mathcal{L} $ to be used. This functionality is achieved by adding a child struct that inherits the struct Operator. The virtual functions of struct Operator that need to be defined are ''apply'' and ''applyAt0'', the functions require one to also specify the basis to which the operator is applied. For example if one was to define the hyperviscosity operator denoted as $\nabla^{2\alpha}$, we would say that the RBF-FD approximation is,
 
$$
$
\nabla^{2\alpha} u \approx \sum_{i=0}^n u_i \nabla^{2\alpha} \Psi_i (u) + \sum_{j=0}^\ell \nabla^{2\alpha}\beta_{i} u_i
\begin{align}
$$
  \nabla^4 u &= f      &&\text{in } \Omega, \\
  u &= g_d          &&\text{on } \partial \Omega,\\
  \frac{\partial u}{\partial \vec n} &= g_n          &&\text{on } \partial \Omega,
\end{align}
$
where $u = TODO$ and $f$, $g_d$ and $g_n$ are computed from $u$.
 
TODO: JureMB

Revision as of 12:26, 12 July 2024

Medusa library support users defining custom basis types, weights, operators and more, as long as they conform to the prescribed interfaces, given in the Concepts page.

Custom stencil selection

TODO

Custom RBF definition

TODO

Custom operators: Hyperviscosity operator

Medusa library also allows custom linear operators $ \mathcal{L} $ to be used. This functionality is achieved by adding a child struct that inherits the struct Operator. The virtual functions of struct Operator that need to be defined are apply and applyAt0, the functions require one to also specify the basis to which the operator is applied. For example if one was to define the hyperviscosity operator denoted as $\nabla^{2\alpha}$, we would say that the RBF-FD approximation is, $$ \nabla^{2\alpha} u \approx \sum_{i=0}^n u_i \nabla^{2\alpha} \Psi_i (u) + \sum_{j=0}^\ell \nabla^{2\alpha}\beta_{i} u_i $$