Hello,
I have developed a solver for which the variable is defined as a edge value (one value per element edge) of 303 or 404 elements of a 2D mesh.
For that purpose, I set
Element = "n:0 e:1"
in the solver section
This is working fine if my global mesh is 2D (i.e. if the global mesh is the mesh on which I execute the solver).
If my global mesh is 3D and that I execute the solver only on a boundary of the 3D mesh, I'm facing different problems...
1/ If I use the internal mesh extrusion starting from a 3D footprint, it appears that my solvers is not executed because the Solver % Matrix is not associated.
2/ Instead, if I only use the StruturedMeshMapper and start with a 1m thick mesh (3D), then I get a Segmentation fault in the StructuredMeshMapper. I don't get this Segmentation fault if I comment Element = "n:0 e:1" in my solver (but it doesn't work then...)
3/ If I start from a 3D mesh with already the good geometry (No internal mesh extrusion and no StruturedMeshMapper) then it is working but only if I execute the solver on the whole domain. If I execute the solver only on the body defined as a BC of the whole domain, then again the Solver % Matrix is not associated (for cases 1 and 2, the solver was also executed on the whole domain).
Cases 1 and 2 seems to indicate that there is some issue with the internal mesh extrusion and the use of Element = "n:0 e:1" in a solver?
I'm a little bit lost with what is the exact effect of setting Element = "n:0 e:1" despite it creates edge type element. It seems to have backside effects that I don't really understand.
What is not done properly here? I can send an example if it would help.
Thanks
Olivier
Edges values
Re: Edges values
Hello again,
One more issue I'm facing with using edge element. It seems that like for boundary element, no material is associated?
In the solver, I have a loop over the edge elements and need "material" to read parameters in the material section of the sif file.
Doing this, doesn't work. I did try, as for boundary elements:
But is doesn't work also.
My question is: what should be done to access "Material" in a loop over edge elements?
Thanks
Olivier
One more issue I'm facing with using edge element. It seems that like for boundary element, no material is associated?
In the solver, I have a loop over the edge elements and need "material" to read parameters in the material section of the sif file.
Code: Select all
DO t=1, Solver % Mesh % NumberOfEdges
Element => Solver % Mesh % Edges(t)
Material => GetMaterial()
END DO
Code: Select all
DO t=1, Solver % Mesh % NumberOfEdges
Element => Solver % Mesh % Edges(t)
ParentElement => Element % BoundaryInfo % Left
IF ( .NOT. ASSOCIATED( ParentElement ) ) THEN
ParentElement => Element % BoundaryInfo % Right
END IF
Material => GetMaterial(ParentElement)
END DO
My question is: what should be done to access "Material" in a loop over edge elements?
Thanks
Olivier
Re: Edges values
Hi,
perhaps this might not help (as not the source of your issues), but the on boundary added body ID's in 3D meshes in connection with internal extrusion got broken in one of the more recent revisions. That has been fixed yesterday. If you have a more recent, but not latest Elmer revision, update and try again.
Best,
Thomas
perhaps this might not help (as not the source of your issues), but the on boundary added body ID's in 3D meshes in connection with internal extrusion got broken in one of the more recent revisions. That has been fixed yesterday. If you have a more recent, but not latest Elmer revision, update and try again.
Best,
Thomas
Re: Edges values
Hi Thomas,
Thanks for your answer.
For the second post (no material associated with edge elements) I really don't think that the problem comes from here as I'm working on a 2D test case (no extrusion).
For the first post (about the different behaviour for 3D meshes), yes it might be the raison, the point is that I cannot test it until I have resolved the problem with the not associated material for the edge elements... I will redo the tests with a new install of Elmer as soon as I have this one fixed.
Thanks
Olivier
Thanks for your answer.
For the second post (no material associated with edge elements) I really don't think that the problem comes from here as I'm working on a 2D test case (no extrusion).
For the first post (about the different behaviour for 3D meshes), yes it might be the raison, the point is that I cannot test it until I have resolved the problem with the not associated material for the edge elements... I will redo the tests with a new install of Elmer as soon as I have this one fixed.
Thanks
Olivier
Re: Edges values
Hello,
I post here the reply I had from Juha regarding my second post of this list.
Olivier
Hi,
the edges should have faces as "boundaryinfo % left & right" pointers.
In 3D the two are just some of the faces that the edge joins,
no way to control that in advance i think. The parent elements
of the faces have materials. So you could use something like
What happens at material boundaries is not clear however....
You could do the loop over the bulk elements instead of the edges,
keeping count which of the bulk edges have already
been acted on. That would make the thing consistent
If your edge equations are over a boundary of the 3D domain,
you could do same thing over boundary elements instead of bulk
elements.
Regards,Juha
I post here the reply I had from Juha regarding my second post of this list.
Olivier
Hi,
the edges should have faces as "boundaryinfo % left & right" pointers.
In 3D the two are just some of the faces that the edge joins,
no way to control that in advance i think. The parent elements
of the faces have materials. So you could use something like
Code: Select all
material=>Null()
face=>Edge % BoundaryInfo % Left
if(associated(face)) then
bulk=>Face % BoundaryInfo % Left
IF(Associated(bulk)) material=>GetMaterial(Bulk)
endif
if(.NOT.ASSOCIATED(Material)) error
You could do the loop over the bulk elements instead of the edges,
keeping count which of the bulk edges have already
been acted on. That would make the thing consistent
Code: Select all
DO i=1,GetNOFActive()
Element =>GetActiiveElement()
Material=>GetMaterial()
DO j=1,Element % Type % NumberOfEdges
k=Element % EdgeIndexes(j)
IF(AlreadyProsessed(k)) CYCLE
AlreadyProcessed(k)=.TRUE.
Edge => Mesh % Edges(k)
...
END DO
END DO
you could do same thing over boundary elements instead of bulk
elements.
Regards,Juha