## Where communities thrive

• Join over 1.5M+ people
• Join over 100K+ communities
• Free without limits
• Create your own community
##### Activity
• 01:38
kishore-nori opened #789
• May 25 07:11
• May 25 07:11
• May 25 07:11
• May 25 07:11
• May 25 07:11
• May 24 11:51

fverdugo on gh-pages

build based on d464956 (compare)

• May 24 11:48

• May 24 11:48

Generalized-alpha method Fixes in generalized alpha updated NEWS.md and 3 more (compare)

• May 24 11:48
• May 24 11:29
codecov-commenter commented #781
• May 24 10:52
• May 24 10:52

Added ModalC0 Bases Added ModalC0 RefFEs Added Modal C0 RefFEs for Seren… and 10 more (compare)

• May 24 02:59
amartinhuertas commented #787
• May 24 01:51
amartinhuertas commented #787
• May 23 11:33
amartinhuertas commented #787
• May 23 11:32
amartinhuertas commented #787
• May 23 02:00
kishore-nori edited #787
• May 23 01:59
kishore-nori edited #787
• May 19 02:33

fverdugo on gh-pages

build based on 447d58e (compare)

Francesc Verdugo
@fverdugo
@Kevin-Mattheus-Moerman perhaps it is related with your problem. Try to build the jacobian with automatic differenciation to see if you get an improvement. I.e. Build the FEOperator only from the residual: FEOperator(res,U,V) instead of FEOperator(res,jac,U,V)
Kevin Mattheus Moerman
@Kevin-Mattheus-Moerman
What is the typo?
2 replies
@fverdugo using FEOperator(res,U,V) helped to remove the hiccup. What is the typo for dS, I currently have:
function dS(∇du,∇u)
Cinv = inv(C(F(∇u)))
_dE = dE(∇du,∇u)
λ*(Cinv⊙_dE)*Cinv + 2*(μ-λ*log(J(F(∇u))))*Cinv⋅_dE⋅(Cinv')
end
Bhavesh Shrimali
@bhaveshshrimali

@Kevin-Mattheus-Moerman Looking at it quickly, I think it should be

function dS(∇du,∇u)
Cinv = inv(C(F(∇u)))
_dE = dE(∇du,∇u)
λ*J(F(∇u))*(Cinv⊙_dE)*Cinv + 2*(μ-λ*log(J(F(∇u))))*Cinv⋅_dE⋅(Cinv')
end

with the extra J coming from the derivative ∂J/∂E (assuming I didn't mess up any signs). Does this help?

2 replies
Bhavesh Shrimali
@bhaveshshrimali
Simply recording the animation for those values doesn't have that weird looking step 7 in my case:
Marie726pro
@marie-prog0627
Hi everyone, new user here, loving the library so far. I am trying to implement an external force in linear elasticity, I have no idea to configure the node external force vector in Gridap.
I would be grateful if you would send me how to code. Sorry to ask something so elementary.
Bart Janssens
@barche
Hi all, is there an overview of the different operators that are avialable, and what their effect is in terms of index notation? Specifically, I'd like to be sure about the effects (and when to use) $\cdot$, $\odot$ and *.
Francesc Verdugo
@fverdugo
hi @barche unfortunatelly this is only partially documented. Now de easest way to see the available operators is going to src/TensorValues/Operations.jl and see the source code
Bart Janssens
@barche
Thanks!
Bart Janssens
@barche
In the mean time, I had an idea for a JuliaCon proposal comparing my experience between Gridap and our Coolfluid C++ code ( https://www.hindawi.com/journals/sp/2015/797325/ ). I'd also like to compare performance, is there a way to time the linear system assembly?
Francesc Verdugo
@fverdugo
@barche the current way of benchmarking the assembly loop is by using the low level assembly routines: I.e. instead of writting op=AffineFEOperator(a,l,U,V) use:
    du = get_trial_fe_basis(U)
dv = get_fe_basis(V)
uhd = zero(U)
data = collect_cell_matrix_and_vector(U,V,a,l,uhd)
Tm = SparseMatrixCSC{Float64,Int32}
Tv = Vector{Float64}
assem = SparseMatrixAssembler(Tm,Tv,U,V)
A, b = assemble_matrix_and_vector(assem,data) # This is the assembly loop + allocation and compression of the matrix
assemble_matrix_and_vector!(A,b,assem,data) # This is the in-place assembly loop on a previously allocated matrix/vector.
3 replies
Bart Janssens
@barche
Thanks!
Francesc Verdugo
@fverdugo
Hi! Applications for this year's Google Summer of Code #GSOC are still open! If you want to participate within the Gridap project, see our project ideas page https://github.com/gridap/GSoC/blob/main/2022/ideas-list.md
Sébastien Brisard
@sbrisard:matrix.org
[m]

Hi,

thanks for the excellent work put in Gridap.jl. I'm setting up a numerical homogenization simulation with periodic boundary conditions, in two dimensions. The model was generated with GMSH, here is an extract of the *.geo file (I know I can use the Julia interface to GMSH as well)

bottom() = Line In BoundingBox{-0.00075, -0.00075, -0.00075, 5.00075, 0.00075, 0.00075};
top() = Line In BoundingBox{-0.00075, 4.99925, -0.00075, 5.00075, 5.00075, 0.00075};
Periodic Line{top()} = {bottom()} Translate{0, 5.0, 0};

left() = Line In BoundingBox{-0.00075, -0.00075, -0.00075, 0.00075, 5.00075, 0.00075};
right() = Line In BoundingBox{4.99925, -0.00075, -0.00075, 5.00075, 5.00075, 0.00075};
Periodic Line{right()} = {left()} Translate{5.0, 0, 0};

The model is then retrieved from within Julia with

model = GmshDiscreteModel(joinpath("..", "validation", "f=0.3", "N=25", "h=0.075", "00001.msh"))

and the FE spaces are defined as follows (as indicated by Tutorial 12, periodic BCs are automatically accouted for)

order = 1
reffe = ReferenceFE(lagrangian, Float64, order)
V = TestFESpace(model, reffe; conformity=:H1, constraint=:zeromean)
U = V

I then solve a standard conductivity problem. The solution, u₁ does not however seem to be periodic

u₁(Point(0., 1.)) = 0.4216567688688445
u₁(Point(5., 1.)) = -0.49267721257058655

What might have I done wrong? How can I check that periodic boundary conditions are indeed enforced by Gridap upon reading the periodic GMSH mesh?

Thanks,

Sébastien

Francesc Verdugo
@fverdugo
Hi @sbrisard:matrix.org, regarding periodic BCs I have found and fixed several bugs last week. Try to use the latest version in GridapGmsh#master and also a recent version of gmsh itself. (I found that old version of gmsh had a bug in periodic BCs in 3D, but this not the problem in your case)
2 replies
Sébastien Brisard
@sbrisard:matrix.org
[m]
Thanks, will do ASAP.
By the way. I've tried to import a quadratic mesh (T6) with curved boundaries. This is not implemented (yet) in Gridap?
Francesc Verdugo
@fverdugo
It is not implemented in GridapGmsh, but Gridap should work also with high order meshes
It should be relativelly easy to add it to GridapGmsh though
Sébastien Brisard
@sbrisard:matrix.org
[m]
Great! Even with curved boundaries ? That used to be not supported by FEniCS (I believe FEniCS-X does support this feature, now) nor FreeFem++ as far as I am aware
Francesc Verdugo
@fverdugo
yes, curved boundaries are supported in Gridap
but you need to feed gridap with a curved mesh and this is the part not yet implemented
2 replies
Sébastien Brisard
@sbrisard:matrix.org
[m]
That would be great. Thank you for this work. I'm really excited with Gridap
Francesc Verdugo
@fverdugo
Thanks!
Markus Clauß
@claussm:tu-dresden.de
[m]

Hello, I am new to FEM simulation with julia. To get started, I would like to build a model that connects multiple boxes via contact conditions (tied and frictionless contact). Can I use gridap for this? Unfortunately I have not found any example.

Thank you

carlodev
@carlodev

Hello, I want to study the case of the turbulent channel. I have found something strange in creating geometry with periodic boundary conditions on multiprocessors.
Taking the Tutorial 16 as an example, I just replace the model generation line with
model = CartesianDiscreteModel(domain,mesh_partition,isperiodic = (true, false))
to create a geometry with periodic boundary conditions in X direction, single-process

model = CartesianDiscreteModel(parts,domain,mesh_partition, isperiodic = (true, false))
to create a geometry with periodic boundary conditions in X direction, multi-process

However, the resulting geometry is different in the two cases. The single-process case is apparently the right one. In the multi-process case, the geometry is both 'closed' and with an extra cell in the periodic direction.
I have noticed that you have this kind of problem when you have more than one part in the periodic direction (in this case with a partition of partition = (1,2) and launching the script on 2 cores). I was wondering what I am doing incorrectly

thank you for your help
3 replies
JonasIsensee
@JonasIsensee

Hi all,
I converted a fun evening project into a little blog post.
https://jonasisensee.de/posts/2022-04-29-amazeing-fem/

Francesc Verdugo
@fverdugo
Very nice post @JonasIsensee Thanks for sharing!
herveta
@herveta
Hi. I want to use a simpler mesh generator than gmsh. I found DistMesh2D, which has interesting features. But I have trouble figuring out how to plus the computed mesh into Gridap. Anyone has used this library ? (distmesh2D https://github.com/jstarczewski/DistMesh2D.jl) Or anyone tried to input a mesh from "delaunay" like computations ? Thank you !
Francesc Verdugo
@fverdugo
Once you have a vector of nodal coordinates and cell connecivity its pretty easy to build a mesh in gridap. You will also need to identify boundaries if you want to impose boundary conditions
carlodev
@carlodev

Hello everyone, as a test I tried to solve the transient Poisson equation on parallel distributed. I merely copied the code of tutorial 17 into the first example of tutorial 16. Then I create the model on multi-cores with the line https://github.com/carlodev/Channel_flow/blob/9878fe7d1943a663bc1bdbab9b4fdd9de04bc317/Channel_Multicore_PETSc/TutorialTest/D1_transient.jl#L13

But I got an error

MethodError: no method matching HomogeneousTrialFESpace(::GridapDistributed.DistributedSingleFieldFESpace{MPIData{Gridap.FESpaces.UnconstrainedFESpace{Vector{Float64}, Gridap.FESpaces.NodeToDofGlue{Int32}}, 2}, PRange{MPIData{IndexSet, 2}, Exchanger{MPIData{Vector{Int32}, 2}, MPIData{Table{Int32}, 2}}, Nothing}, PVector{Float64, MPIData{Vector{Float64}, 2}, PRange{MPIData{IndexSet, 2},
Exchanger{MPIData{Vector{Int32}, 2}, MPIData{Table{Int32}, 2}}, Nothing}}})

Is that a bug or am I doing something incorrectly? If I don’t split the model on multi cores it works

Thank you so much for your help

Oriol Colomés
@oriolcg
Can you try linking with GridapDistributed#master?
2 replies
John T. Foster
@johntfoster
Is there a way to use CarioMakie with GridapMakie in a GridapDistributed run to write plot files? (in contrast to using VTK files)
JonasIsensee
@JonasIsensee
How would you compute the surface curvature of a mesh in gridap? (for surface tension effects)
Z J Wegert
@zjwegert
I don’t know the answer to this but I imagine there is a standard way using FEM? E.g., https://arxiv.org/pdf/1703.05745.pdf. Though, it could be already inbuilt in Gridap
JonasIsensee
@JonasIsensee
What would be possible reasons for LUSolver and PardisoSolver to give different results?
LUSolver gives seemingly correct result while PardisoSolver returns complete garbage
12 replies
Dies-Das
@Dies-Das

Hi! I hope this is the right place to ask.

I would like to implement TraceFEM for surfaces, I need the tangential projection to do that. How does one compute the outer product in Gridap/Gridapembedded?

Oriol Colomés
@oriolcg
Hi @Dies-Das , I think @eneiva_gitlab is working along these lines
19 replies
Bart Janssens
@barche
Hey @carlodev, you should post your Gridap SUPG videos here !
carlodev
@carlodev
I implemented the supg method using gridap, and I wanted to share with you this satisfying visualization of vortex shedding on a cylinder at Re 1000
Francesc Verdugo
@fverdugo
Nice!!
rshankar1069
@rshankar1069
Hi everyone! I have a quick query regarding the implementation of Gridap. Is there a way to solve a transient PDE problem involving spatially varying coefficients using Gridap?
3 replies
Oriol Colomés
@oriolcg
Hi @rshankar1069, yes you can solve PDEs with space and time-dependent coefficients. Take a look at this tutorial: https://gridap.github.io/Tutorials/dev/pages/t017_poisson_transient/#Tutorial-17:-Transient-Poisson-equation-1
3 replies
JonasIsensee
@JonasIsensee
Hi,
is there any way to speed up operator assembly?
With Pardiso and 32 threads, I can get solutions within seconds but assembly somehow takes minutes.