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

Physical fes #216

Merged
merged 53 commits into from
Mar 21, 2020
Merged

Physical fes #216

merged 53 commits into from
Mar 21, 2020

Conversation

santiagobadia
Copy link
Member

Hi @fverdugo

Please take a look at this pull request.

I have created a RefTrait for CellField and CellBasis in order to determine whether they are defined in the physical of reference space.

As a result, I have created some additional internal functions for the physical space case.

I have created a FunctionField that given a function creates a Field object, that I have needed in the interpolation subroutines at the physical space.

I have fixed many typos I have bumped into, done some limited renaming, etc.

I have added tests for all the previous machinery, being able to solve problems (e.g., using Lagrangian or Raviart-Thomas) defined in the physical space.

There are a couple of thinks that can be done: 1) create new Kernels for performance, e.g., the inverse of the matrix for change of basis, 2) the to_physical and to_ref functions but I think it is not that important.

Take a look, make comments, etc.

@codecov-io
Copy link

codecov-io commented Mar 19, 2020

Codecov Report

Merging #216 into master will not change coverage by %.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #216   +/-   ##
=======================================
  Coverage   88.93%   88.93%           
=======================================
  Files         143      143           
  Lines        8866     8866           
=======================================
  Hits         7885     7885           
  Misses        981      981           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f87a951...f87a951. Read the comment docs.

Copy link
Member

@fverdugo fverdugo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @santiagobadia

Nice work! Some parts have still to be addressed before merging. The major issues are:

  • The RefTrait (which I suggest to rename to RefStyle to match other traits in the code and in julia itself) has to be introduced at the CellFieldLike level in order to reduce code duplication at the CellField and CellBasis level.

  • The evaluate method that takes care of the RefTrait has to be implemented for CellFieldLike. You have implemented for GenericCellBasis which is not general enough.

  • The evaluate method for CellDofBasis should take a CellFieldLike in the second argument.

  • You have introduced a lot of changes that expose the RefTrait in the interpolation-related functions of SingleFieldFESpace. These functions should be completely agnostic to the trait. The trait should be handled only at the CellDofBasis and CellFieldLike level.

  • The code in src/ReferenceFEs/Dofs.jl should be completely agnostic to the RefTrait. Again, this should be handled only at the CellDofBasis and CellFieldLike level.

If you want, we can discuss this face-to-face since quite critical parts of the code are involved.

src/FESpaces/CellBases.jl Outdated Show resolved Hide resolved
src/FESpaces/CellBases.jl Outdated Show resolved Hide resolved
src/FESpaces/CellBases.jl Outdated Show resolved Hide resolved
src/FESpaces/CellBases.jl Outdated Show resolved Hide resolved
src/FESpaces/CellDofBases.jl Outdated Show resolved Hide resolved
src/ReferenceFEs/Dofs.jl Outdated Show resolved Hide resolved
test/ReferenceFEsTests/MockDofsTests.jl Outdated Show resolved Hide resolved
src/FESpaces/CellBases.jl Outdated Show resolved Hide resolved
src/Geometry/CellFields.jl Outdated Show resolved Hide resolved
src/ReferenceFEs/Dofs.jl Outdated Show resolved Hide resolved
@santiagobadia
Copy link
Member Author

Hi @fverdugo

I have made the changes, can you take a look?

I have left a comment with @fverdugo asking you what to do in a particular place, very minor.

Bests

--Santi

@@ -284,6 +297,9 @@ function operate(op,a,b::CellMatrixField)
operate(op,_a,b)
end

RefStyle(::CellMatrixField) = Val{true}()
# @santiagobadia : @fverdugo can you check what we need here???
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fverdugo can you change it accordingly

@fverdugo
Copy link
Member

@santiagobadia I have fixed a number of issues and pushed to this branch. Take a look to the changes if you want.

Perhaps, before merging it would be a good idea to test the physical dofs for multi-field case. Can you write some test?

@santiagobadia santiagobadia merged commit 6f9291a into master Mar 21, 2020
@santiagobadia santiagobadia deleted the physical-fes branch March 21, 2020 08:33
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

Successfully merging this pull request may close these issues.

3 participants