-
Notifications
You must be signed in to change notification settings - Fork 99
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
changing map to lazy_map to fix issue #905 #906
Conversation
Can the issue be reproduced with a manually built |
How can it be that this condition is not satistied? Isn't dΩ the same object in your comment? |
I tried building |
No.. that is exactly the source of error for this issue, and this PR fixes it. Even if |
Don't use the example provided verbatim. In the example, I am generating a non-conforming mesh, which is currently not well supported by Gridap. You can, e.g., extract the submesh corresponding to the first four cells in the example |
Codecov Report
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. @@ Coverage Diff @@
## master #906 +/- ##
==========================================
+ Coverage 88.51% 88.58% +0.06%
==========================================
Files 173 173
Lines 20269 20540 +271
==========================================
+ Hits 17942 18196 +254
- Misses 2327 2344 +17
... and 2 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Thank you for the pointer.. now the issue is reproducible without a using Gridap
using GridapGmsh
using FillArrays
ptr = [ 1, 5, 9, 13, 17 ]
data = [ 1,2,4,5, 2,3,5,6, 4,5,7,8, 5,6,8,9 ]
cell_vertex_lids = Gridap.Arrays.Table(data,ptr)
node_coordinates = Vector{Point{2,Float64}}(undef,11)
for j in 1:3
for i in 1:3
node_coordinates[3*(j-1)+i]=Point{2,Float64}((i-1)/2.0,(j-1)/2.0)
end
end
polytope = QUAD
scalar_reffe = Gridap.ReferenceFEs.ReferenceFE(polytope,Gridap.ReferenceFEs.lagrangian,Float64,1)
cell_types = collect(Fill(1,length(cell_vertex_lids)))
cell_reffes = [scalar_reffe]
grid = Gridap.Geometry.UnstructuredGrid(node_coordinates,
cell_vertex_lids,
cell_reffes,
cell_types,
Gridap.Geometry.NonOriented())
model = Gridap.Geometry.UnstructuredDiscreteModel(grid)
Ω = Triangulation(model)
dΩ = Measure(Ω,2)
# the problem is below:
dΩ.quad.cell_point === dΩ.quad.cell_point # true
dΩ.quad.cell_point === get_cell_points(dΩ) # false
get_cell_points(dΩ) === get_cell_points(dΩ) # false, the source of the issue #905
# issue #905 example
order = 1
function project(order,Ω)
degree = 2*order
dΩ = Measure(Ω,degree)
# f(x) = sin(norm(x))
f = CellState(1.0,dΩ)
reffe = ReferenceFE(lagrangian,Float64,order)
V = FESpace(model,reffe,conformity=:L2)
a(u,v) = ∫( u*v )dΩ
l(v) = ∫( v*f )*dΩ
op = AffineFEOperator(a,l,V,V)
fh = solve(op)
fh
end
fh = project(order,Ω) # fails
ERROR:
It is not possible to evaluate the given CellState on the given CellPoint.
a CellState can only be evaluated at the CellPoint it was created from.
If you want to evaluate at another location, you would need first to project the CellState
to a FESpace (e.g. via a L2 projection). |
…rule-subface-glue Conflicts: src/Adaptivity/AdaptedDiscreteModels.jl src/Adaptivity/EdgeBasedRefinement.jl
Update ModalC0Bases.jl for Julia 1.9
…e-measure-data-domain-style
…style Customisable measure data domain style
FineToCoarseField for vector-valued fields
Bugfix: Incorrect block assembly when permuting variables
Updated compats for FastGaussQuadrature.jl
it also takes into account the symbolic part corresponding to vector entries. This is a feature required to fix issue 142 in gridapdistributed.jl gridap/GridapDistributed.jl#142
…tributed_issue_142 Feature required to fix GridapDistributed.jl issue
Bump release
Fixed documentation of the BDM element.
fix typo in BDMRefFEs documentation
Fixed some typos
Refactoring of GridapODEs
…es_evaluation_cellstate
Fixes evaluation cellstate
Yes. Let us put it in that directory. |
Changing
map
tolazy_map
to fix issue #905. This is done to return identicalCellPoint
objects. Tests on my local machine have passed.The issue was
get_cell_point(dΩ)
, whenMeasure
dΩ
is built from aGmshDiscreteModel
based onQUAD
s, returnsCellPoint
objects which are non-identical i.e. (get_cell_points(dΩ) === get_cell_points(dΩ)
is not satisfied). This is due to non-identicalcell_phys_point
field inCellPoint
. This results in the issue #905, whereCellState
constructed based ondΩ
doesn't satisfy the compatibility test during integration.Haven't included a test, as I ll then have to include the
.msh
file as well, or may be I can add a test toGridapGmsh.jl
pakcage, which ever seems reasonable..