Difference between revisions of "Customization"

From Medusa: Coordinate Free Mehless Method implementation
Jump to: navigation, search
(Custom operators: Hyperviscosity operator)
(Custom operators: Hyperviscosity operator)
Line 13: Line 13:
 
\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,
 
\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,
 
$$
 
$$
where $\Psi_i (u)$ are cardinal functions and $\beta$ are the monomial weights
+
where $\Psi_i (u)$ are cardinal functions and $\beta_i(u_i)$ are the monomial weights

Revision as of 13:27, 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, $$ where $\Psi_i (u)$ are cardinal functions and $\beta_i(u_i)$ are the monomial weights