-
Notifications
You must be signed in to change notification settings - Fork 92
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
Separate reference domain dimension and nodal coordinate dimension #295
Conversation
All tests passed locally except
Minor improv on docs
N::Matrix{Vec{dim,T}} | ||
dNdx::Matrix{Tensor{2,dim,T,M}} | ||
dNdξ::Matrix{Tensor{2,dim,T,M}} | ||
# ? Vector dimension is assumed to be xdim ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
n_func_basefuncs = getnbasefunctions(func_interpol) * xdim | ||
N = fill(zero(Vec{xdim,T}) * T(NaN), n_func_basefuncs, n_qpoints) | ||
dNdx = fill(zero(Tensor{2,xdim,T}) * T(NaN), n_func_basefuncs, n_qpoints) | ||
# TODO: each entry should be a second order tensor with shape xdim x ξdim |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
N::Array{Vec{dim,T},3} | ||
dNdx::Array{Tensor{2,dim,T,M},3} | ||
dNdξ::Array{Tensor{2,dim,T,M},3} | ||
# ? Vector dimension is assumed to be xdim ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -40,14 +40,15 @@ For a scalar field, the `FaceScalarValues` type should be used. For vector field | |||
FaceValues | |||
|
|||
# FaceScalarValues | |||
struct FaceScalarValues{dim,T<:Real,refshape<:AbstractRefShape} <: FaceValues{dim,T,refshape} | |||
# ? why 3 here? what if we have a hex cell? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question here.
I agree that there should be a way to model beams/shells/trusses etc in JuAFEM. I dont think the dofhandlers can currently correctly distribute dofs for shell elements if one wants 2nd order interpolations. This is due to how faces/edges are defined differently in 2d/3d interpolations. I did however try to solve this a while back in this branch https://github.com/lijas/JuAFEM.jl/tree/line2 My branch makes it possible to do something like this:
I dont think it is needed to rename every dim to xdim. Lets keeps dim for the space-dimension. |
@lijas Thanks for your comments!
This is great! May I ask why the number of faces
Hmm, I only changed |
@lijas Also, do you have a working example for shell elements on your branch? |
A line element in 3d has no faces, it has only one "edge". Maybe these definitions for faces/edges are not always important, but when I have written generic contact algorithms for FE problems, I have noticed that it has been helpful. I also think it is the most correct. I have no working shell example unfortunately. I just wrote some test to see that the dof distributions is correct for shells. |
Summary
This PR tries to split the
dim
type parameter toξdim
andxdim
. Before, the dimension of the reference domain (\xi
) is coupled with the dimension of the nodal coordinate domain.This PR starts with changing
Values{dim,T,refshape}
toValues{ξdim,xdim,T,refshape}
, and other changes are made to make things compatible and non-breaking. Thedim
in function argument are renamed toξdim
orxdim
to clarify the context.This PR is particularly useful for modeling non-standard cell in JuAFEM, e.g. truss elements (1D
Line
cell with nodes in 2D or 3D).What type of change is this?
Checklist
] test
).