-
Notifications
You must be signed in to change notification settings - Fork 97
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
Physical fes #216
Changes from 49 commits
Commits
Show all changes
53 commits
Select commit
Hold shift + click to select a range
a43b645
Corrected some typos and added a PhysicalBasesTests.jl
santiagobadia a826fc8
Problem with zero()
santiagobadia beb79d5
Minor to use `change_basis` function as a kernel
fverdugo 21b5025
Typo labeing -> labeling + added a new function for computation FE sp…
santiagobadia 152df55
Added a new method for physical FE spaces
santiagobadia 5d1764c
Current version
santiagobadia 015ee82
Now new method working in test
santiagobadia 7f9ab1f
Further modifications
santiagobadia ca1cae0
Added method to FESpaces
santiagobadia adf80fd
GenericNodalRefFE -> GenericNodalCartesianRefFE
santiagobadia 878287d
get_nodes from dofbasis et al
santiagobadia 7210eec
Now everything works for physical space defined Lagrangian and RT ref…
santiagobadia bc2cec4
Better internal structure methods
santiagobadia 1c5f941
Test improvements
santiagobadia 78d783a
Machinery for creating Grand and Curl conforming FE spaces with DOFs …
santiagobadia 0fd0aea
Added methods for interpolation in the physical space
santiagobadia 160c05a
Added tests
santiagobadia 5d6df6e
Bug in FE factories
santiagobadia 2eadae1
Merge branch 'master' of github.com:gridap/Gridap.jl into physical-fes
santiagobadia ddd4c1d
Typos
santiagobadia 51eda45
curl in physical
santiagobadia 9ba259d
CellDofBasis and Traits for CellFieldLike
santiagobadia 5a1fcfd
Added CellDofBasis to FE spaces constructors
santiagobadia 2f53775
Fixing bugs
santiagobadia f7421a8
fixing extended fe space
santiagobadia 213cccd
Adding methods, traits, fixing bugs
santiagobadia cdeb6bf
Now working interpolation
santiagobadia 8e15408
minor
santiagobadia ec1453b
Adding Trails to CellBasis and CellFields
santiagobadia f748683
Fixing typos, misc changes
santiagobadia 5055e2a
Fixing typos, e.g., extended fe spaces
santiagobadia 09a9cb4
Added tests, fixing typos
santiagobadia a7c3a38
Added tests, fixes
santiagobadia cbcdabd
Added poisson test in physical space
santiagobadia 6e1b494
Merge branch 'master' of github.com:gridap/Gridap.jl into physical-fes
santiagobadia 19313fa
Fixing Hcurl, order in RT
santiagobadia 4306a8f
Renamed RefTrat -> RefStyle
santiagobadia 5fff1f6
Moving RefStyle to CellFieldLike
santiagobadia 86077f0
Moving RefStyle to CellFieldLike 2
santiagobadia 67ae319
More on the same REfStyle move
santiagobadia 9acce8f
Removed inner constructor
santiagobadia 380c716
Improving CellDofBasis
santiagobadia 2b69c80
Added to_ref_space and to_physical_space methods for CellFieldLike
santiagobadia bcec842
Some minor changes
santiagobadia 47dde12
Moving methods to CellFieldLike, intensive cleaning up, etc
santiagobadia 1e677db
Cleaning up
santiagobadia 593246e
Adding RefStyle to more CellFieldLike subtypes
santiagobadia 11f5598
Eliminating trait from evaluate_dof_array
santiagobadia 08fb421
No RefStyle in Interpolate
santiagobadia 5e2885d
Reactivating some docs
fverdugo 685a4fb
Misc changes to make phys ref spaces work (single field)
fverdugo 1cfe779
physical fe spaces also for multi-field
fverdugo f87a951
Corrected DG space w/ physical, multifield tests
santiagobadia File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,6 +34,6 @@ n_components | |
inner | ||
outer | ||
meas | ||
symmetic_part | ||
symmetric_part | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
""" | ||
abstract type CellDofBasis end | ||
|
||
Abstract type that represents a cell array of `Dof`. The main motivation for | ||
its definition is to provide a trait that informs whether the `Dof` entries are | ||
defined for functions in the reference or physical space | ||
""" | ||
abstract type CellDofBasis end | ||
|
||
santiagobadia marked this conversation as resolved.
Show resolved
Hide resolved
|
||
RefStyle(::Type{<:CellDofBasis}) = @abstractmethod | ||
get_array(::CellDofBasis) = @abstractmethod | ||
|
||
RefStyle(::T) where T <: CellDofBasis = RefStyle(T) | ||
|
||
is_in_ref_space(::Type{T}) where T <:CellDofBasis = get_val_parameter(RefStyle(T)) | ||
is_in_ref_space(::T) where T <:CellDofBasis = is_in_ref_space(T) | ||
|
||
function test_cell_dof_basis(cf::CellDofBasis,f::CellFieldLike) | ||
ar = get_array(cf) | ||
@test isa(ar,AbstractArray) | ||
a = evaluate(cf,f) | ||
@test isa(RefStyle(cf),Bool) | ||
end | ||
|
||
""" | ||
evaluate(dof_array::CellDofBasis,field_array::AbstractArray) | ||
|
||
Evaluates the `CellDofBasis` for the `Field` objects | ||
at the array `field` element by element. | ||
|
||
The result is numerically equivalent to | ||
|
||
map(evaluate_dof, dof_array.array, field_array) | ||
|
||
but it is described with a more memory-friendly lazy type. | ||
""" | ||
function evaluate(cell_dofs::CellDofBasis,cell_field::CellFieldLike) | ||
_evaluate_cell_dofs(cell_dofs,cell_field,RefStyle(cell_dofs)) | ||
end | ||
|
||
function _evaluate_cell_dofs(cell_dofs,cell_field,ref_trait::Val{true}) | ||
evaluate_dof_array(get_array(cell_dofs),get_array(to_ref_space(cell_field))) | ||
end | ||
|
||
function _evaluate_cell_dofs(cell_dofs,cell_field,ref_trait::Val{false}) | ||
evaluate_dof_array(get_array(cell_dofs),get_array(to_physical_space(cell_field))) | ||
end | ||
|
||
""" | ||
""" | ||
struct GenericCellDofBasis{R} <: CellDofBasis | ||
ref_trait::Val{R} | ||
array::AbstractArray{<:Dof} | ||
end | ||
|
||
RefStyle(::Type{<:GenericCellDofBasis{R}}) where R = Val{R}() | ||
|
||
get_array(a::GenericCellDofBasis) = a.array |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
@fverdugo can you change it accordingly