Skip to content
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

API changes to FEMBasis 0.3 #29

Open
ahojukka5 opened this issue Sep 25, 2018 · 0 comments
Open

API changes to FEMBasis 0.3 #29

ahojukka5 opened this issue Sep 25, 2018 · 0 comments
Milestone

Comments

@ahojukka5
Copy link
Member

In the next minor, we should somehow solve the issue of having multiple basis functions for the same topology. Motivation comes here: https://github.com/JuliaFEM/FEMPlates.jl/blob/master/src/dkt.jl#L34

It looks that this is kind of normal situation, that some basis functions need to be calculated "in the fly" based on the actual geometry. And the same topology can have different basis functions depending on the problem. We can default the basis function evaluation to Lagrange nodal basis, but we should also offer an option to create more complex basis functions which cannot necessarily be constructed beforehand.

For constructing nodal basis functions, we could have something like

struct Tri3 end
struct Lagrange end
X = ((0.0,0.0), (1.0,0.0), (0.0,1.0))
p = :(1 + u + v)
@create_basis(Lagrange, Tri3, p, X)

And after that, we can evaluate basis functions

get_basis(Lagrange(), Tri3(), xi)
get_basis(Tri3(), xi) # defaults to Lagrange..?

Then, we could also implement e.g. that DKT basis, but for that, we need the geometry of the element:

struct DKT end
function FEMBasis.get_basis(::DKT, ::Tri3, X)
    # implementation
end
get_basis(DKT(), Tri3(), X, xi)

There is even more complicated situations, where the basis functions depends not only the element geometry, but also geometry from surrounding elements, like bi-orthogonal basis in contact mechanics.

@ahojukka5 ahojukka5 added this to the 0.3.0 milestone Sep 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant