LongCut logo

FerriteCon 2025 Kim Louisa Auth : Introduction to Ferrite.jl

By The Julia Programming Language

Summary

Topics Covered

  • Julia Delivers C Performance Without Rewrite
  • Ferrite Builds Blocks Not Solvers
  • Element Routines Mirror Weak Forms
  • Swap Elements Change Three Lines
  • Subdomains Enable Mixed Physics

Full Transcript

Okay. Yeah. Um, hi again. Um, not only uh organizing this conference today, I also have the honor of giving the introduction to fidite talk today. Um,

this is a talk targeted more towards those of you who have maybe not used ferid uh before. Can I get a show of hands of those people who have not draw not very much used ferid?

Oh wow. I'm very happy we have this talk then. Um so that's for you and I hope

then. Um so that's for you and I hope that it's interesting for those of you who have used fite a lot as well. Um

uh this is not the first time we give this type of talk. Uh so I want to mention that uh Frederick has given this type of talk and this slid set is actually vastly based on a talk that

Clude has prepared a while ago. Um but

uh now you get me here as a speaker today. My name is Kim for those of you

today. My name is Kim for those of you who don't know me. Um and I was a PhD student at Chmas at the group of material and computational mechanics up

until last year. Um which is also where I encountered Julia and Fite for the first time. Uh and now I'm a postto here

first time. Uh and now I'm a postto here at DTU at the section of solid mechanics. I work with fite in my

mechanics. I work with fite in my research every day. Um and I have done a fair share of work on fite over the past six or so years as well.

Um we're going to talk uh very briefly about what is Julia and um a little bit of background and history of the uh but then I'm going to spend most of the time

on what is parid, what is in there and how do we use it uh and round up with a couple of example.

Um so Julia is a relatively young programming language. It was first press

programming language. It was first press released in 2012, which when I look at research papers now isn't all that recent anymore. That's a decade and a

recent anymore. That's a decade and a half actually at this point. Um, but the 1.0 release happened in 2018 and 1.0

release is a big deal because the Julia project uses semantic versioning and 1.0 means they promise they're not going to break the user interface badly until

they release uh well 2.0 which is nowhere in the plans. So for me that has worked really nicely. I've been working with Julia since 2019 and um it has never been the Julia project that broke

my code. Uh there is of course many

my code. Uh there is of course many other ways to break your code. Uh the

current release is 1.11.6 and some of the claims that are made about Julia that are nice is it's very easy to get into. So if you know some

MATLAB, the math syntax is going to look very familiar. Um it's very easy to

very familiar. Um it's very easy to write your first program. your first

program is probably not going to be super performant. Maybe it's going to

super performant. Maybe it's going to perform a little bit like Python. Um,

but then Julia is just in time compiled, which means it can perform just like uh your favorite compiled programming language of choice. That could be C, C++, Forron, whatever you're using

there. And what I found really nice is

there. And what I found really nice is that there is a huge amount of tools that can help you identify what is the heavy parts in your program. um and how

do I make them faster? So for me that was a learning journey of how to write fast code, how to how do you need to write code so that it can be performant and um I think it's an extremely nice

programming language for that. And then

you can write really performant code as well. Um but today isn't really about

well. Um but today isn't really about Julia itself. It's about fite from this

Julia itself. It's about fite from this point on. And ferite is a finite element

point on. And ferite is a finite element toolbox which means it provides building blocks for writing a finite element code. It's not really a full finite

code. It's not really a full finite element suite. So you can't go in and

element suite. So you can't go in and say just solve linear elasticity for me.

We don't do that. But we provide the blocks for writing your own uh solver for solving a linear elasticity problem for example and we're in fact going to

look at that in a couple of minutes. Um

this was started by um Frederick and Christopher who are sitting here in the room hiding in the back um back in 2016

or it was still called UFM um in Utaria and ever since it's picked up uh adoption a lot as of today we have 37

unique contributors who are not bots um we have 394 GitHub stars um and I think all those of you who have not given this project a GitHub store, but you care

enough to sit in a room of the conference about this toolbox should go in and push us above 400. Now, um

this is the fourth year that we're running Teritecon. Um which is really

running Teritecon. Um which is really really nice and uh you can see on the map that you're coming from a bit all over the place because this is where we have uh people from here today. uh

according to who signed up. To be fair, two of the really far away pins are our industry online talk that we will have later this afternoon. Um and we have also released a 1.0 version last year

around this time at Feradcon. Uh which

means for now we're also trying to not break your code when you update FID. Um

and I'll leave it up to you to judge how well that went over the past year. Um

but we've done a lot of improvements and I think it's been a really nice release.

So I hope you're all working on the 1.0 version.

Um yeah, but then let's come to uh what do we do in fite and let's look a little bit at what do we need for a finite element program. So we need to start by

element program. So we need to start by uh defining some computational domain usually a geometry uh and we do that by

meshing. Meshing is a complex task and

meshing. Meshing is a complex task and an entire field of research for itself.

So that's nothing we really do within Ferrite that much. We have a couple of simple built-in mesh generators for regular grids. Really simple things just

regular grids. Really simple things just to try try codes out. Um but then there is interface packages to both the open

source project G mesh and uh we also have a parser for aracus input files and I've worked with both of them for more complex geometries. works really nicely

complex geometries. works really nicely and um we'll leave the meshing to the people who do research on meshing because uh we do research on finite elements.

Um okay, once we have the mesh, we're probably going to want to introduce some fields in order to specify our physics with them. Uh and we do degree of

with them. Uh and we do degree of freedom handling. So um we can we can

freedom handling. So um we can we can actually do a lot of things there. We

have a lot of different interpolations that we can use. We can uh do scala fields, vector fields, uh we can do fields on subdomains. Uh and that is

something that's inherent in ferret. So

that's an important part. And then the probably most important part is that uh we supply a lot of tools for shape function evaluation so that you can write element routines because we do not

supply full element routines in ferite since that's the physics you want to specify and especially in research that can often be quite specific complicated

things um but we give you all the tools so that it becomes really easy to write um there was also the tools to enable uh

your local uh contributions into a global sparse matrix. Uh I'm sorry Valentine for not uh talking about meshless uh methods here. Now we like

sparse systems and we have really cool tools to specify the sparsity patterns uh of the system. Um and once you have that you uh probably want to add some boundary conditions to the system too

and there's tools for that. We have

directly boundary conditions. there is

different types of periodic boundary conditions. You can play around with the

conditions. You can play around with the theme constraints. Um so the we have

theme constraints. Um so the we have tooling around that as well. Um and then once you have your system fully specified added boundary conditions,

you're going to want to solve it. Um and

solvers are something you uh write yourself for the nonlinear solver and something that's a very deep rabbit hole to go down for the linear solvers. So

again we leave the linear solver assigns to uh the scientists in that field. Um

if you have a [laughter] if you have a very small problem and you just want to demonstrate something there's always backlash. Um it's not what I would recommend to use when you

write actual uh code for your science.

Maybe it's a little bit bigger and maybe you actually care about the linear solver. Um and then you can interface

solver. Um and then you can interface whatever you like best from the Julia ecosystem. So there is this linear

ecosystem. So there is this linear solve.jl package by uh CML that

solve.jl package by uh CML that interfaces a a ton of different linear solvers both direct solvers iterative solvers. So I like to use this because

solvers. So I like to use this because it makes it really easy to uh swap out the solver you're using but you can also directly go in and use um interface

packages to per do or to suites like hyper for iterative solvers. So there is plenty of options. Um and that's not a

part of the right the linear solver. Use

the ecosystem. Um it's amazing. But once

you have a solution, you're probably going to want to uh look at your solution and maybe do a couple of things with it as well. So we have post-processing tools for projecting um

quadro data to notes so that you can plot it. uh we have tools to do things

plot it. uh we have tools to do things like cut lines and cut planes where you can evaluate your fields in random points of the domain and then we uh

supply builtin export to the BTK family of file formats so that you can look at your data in far view and um then it's usually really easy to

plot your data with the different Julia plotting tools as well there is a package called parite this that makes it a bit easier to plot things and Makia. I

believe that suffered from some PhD thesises a bit lately. Um I also really like to just directly plot things using Machia or maybe somebody else prefers plots.jl.

plots.jl.

Um so that's an overview of what is or is not in Ferrite. Um let's have a look at how we do things because this is a programming part in the end, right? So

I'm gonna skip talking about a package called tensors.jl JL that is the

called tensors.jl JL that is the backbone of parite and does the tensor calculus part for us because Christopher will get to talk about that after lunch.

So be a bit patient for that. Um but I'm going to go over how to implement the stationary heat equation as a 101 example now and then show a couple of

variations to it, a few more advanced things and round up with a couple of showcases.

Um so we said the first thing we need to do is generate a grid. And here I'm going to use one of the grid generators that we have uh in Farite just to get a really simple unit square grid. Some

people in this room really like unit squares. Um and then I'm going to want

squares. Um and then I'm going to want to distribute degrees of freedom and we do that with a data structure called dove handler. Um so I initialize this

dove handler. Um so I initialize this and tell it that's the top that's the grid that I want to distribute doss on.

Um and then I can specify what type of interpolation do I want for these degrees of freedom. So here up here I'm specifying I want type of

interpolations. So lrange polomials on a

interpolations. So lrange polomials on a reference triangle and I want them to be first ordered. So on this triangular

first ordered. So on this triangular element with three nodes I get uh three degrees of freedom. It's a scalar interpolation one on each node and then

I add that to the doc method which will collect all the different fields that I can that I'm adding to it now. So in

Julia when you um do in place operations and you modify data structures it's a convention to add an exclamation mark of the function. So that is why it's called

the function. So that is why it's called at exclamation mark. Um and then I'm basically saying to this stuff handler add a field that is called you and that

has the interpolation IP from up there.

Um I could use more complex um interpolations or like higher order in this case. So all I do is I tell it now

this case. So all I do is I tell it now I want a second order polomial and I also get degrees of freedom uh on the edges here. Now I'm in solid mechanics

edges here. Now I'm in solid mechanics so I really like displacement fields and that's vector fields. Um and we can add uh vector fields as well of course. So

what I do here is I still say I want my lash polomial. I want a linear polomial

lash polomial. I want a linear polomial and then it says raised to the power of two and since this is 2D um this is what vectorizes the interpolation. It's just

the syntax for vectorzing it so that we get a vector valued field. So in this case now I would have uh doss for three different fields in this do handler. Um

and then I I need to use this close call to finalize the computation uh on distributing the degrees of freedom. Uh

and from now on I can just request uh of freedom that belong to certain cells from the do handler and uh the complexity of doing that is abstracted

away from the user here. um we wanted to solve the heat equation. So uh let's stick with a single scalar field. That's

a bit simpler, right?

Um and then let's look at how we actually specify the physics. How do we write the element routine? Um so the equation is

element routine? Um so the equation is fairly simple I would say. Here you have the weak form in the first row and then you have the second row which is a

finite element discretized form with um test functions uh delta n and trial functions n. Um and we're going to look

functions n. Um and we're going to look at how this looks in code now. So I've

already defined the interpolation I want to use for my field. Um that's in fact not the only interpolation I need. I'm

also going to have to specify how I want to interpolate the geometry. I could

just use the default and I want to use the same as the field, but I can uh choose something else as well. Um I'm

going to want to perform integration. So

I need a quadrier rule for doing my numerical integration. And this is very

numerical integration. And this is very analogous to the interpolation. Now I

say I want quadrich rule. I want it on a reference triangle. And then I'm also

reference triangle. And then I'm also saying I want two integration points in each spatial direction. So for a triangle that's going to mean z integration points in total. For a

quadrilateral that would be four if I have two in each direction.

>> Um and then I collect uh these pieces of information in an object that is called cell values. And I like to describe this

cell values. And I like to describe this as the element type we have because this is now saying I have a triangle with

linear geometry and linear function interpolation and I have uh a full integration. I have two integration

integration. I have two integration points in each direction um here and this object is going to help me evaluate um the different shape function values

that I need. So it stores shape function values in the integration points. But we

also have a lot of methods defined on this that can compute uh spatial gradients and so on on jacobi determinance these type of things uh on

this element. Now um and then I'm going

this element. Now um and then I'm going to write the element routine um and we're going to look at that in detail.

So um starting out uh I give it a couple of input things. So I give it a local stiffness matrix and a local uh residual vector because I don't want to

reallocate these for each element. This

is a very hot loop in my finite element program. So I'm going to allocate it

program. So I'm going to allocate it once and then reuse it for every element. Um, then I handed this cell

element. Um, then I handed this cell values object that tells me my element type and um I'm also going to have to hand the coordinate vector um of the

specific cell the noble coordinates um in this case. So if we compare to what the equations look like and what the code looks like maybe you can see that I

would say this is very similar. So, uh,

what I'm saying here is for my residual vector, uh, on the if entry of this, I'm going to want to add, um, something that

does something with the test function with the test function. Um, and then you can also recognize that we have this omega and I'm going to go and fill this

with a bit of value uh, soon. And same

for my expression for the stiffness matrix which is this. Uh it also looks pretty much exactly like in the equations I write down in my paper. Um

which is very nice when we're not doing something like the heat equation but maybe some complicated multi-ysics fracture mechanics problem which is what I like to do. And then these equations are a lot longer and a lot more complex.

And it's very nice to be able to express it in a way that looks similar to um what I've maybe written down in terms of your regation.

Um so what we have in here is we have these spatial gradients of uh the test functions and the trial functions. And

in order to get the accurate spatial gradients, I'm going to need to compute them based on the cell coordinates. And

that's what this reinit call does. So

reinitializing the cell values with the cell coordinates performs a bunch of computations that makes sure my gradients and my jacobians are correct.

And then in order to perform the integration I'm going to loop over all the prototype points. That's nothing

special um for people writing funded element programs. Uh and then the first thing I can request for each quad chop point is this omega thing and this is um

the product between the Jacobi determinant and the quad chop points weight. Um

weight. Um and then I and this is maybe a bit different from what you know if you're used to writing finite element code in terms of B operators. Uh what I do now

is I loop over the entries of the residual vector and then also over the um columns of the stiffness matrix and

uh assemble them one entry at a time. So

I can uh if I go over the test functions I then I can request the test function values and gradients from the cell

values by saying I want the uh value of the I test function in the qoint quarter point uh out of the cell values object.

Um and then I loop over the trial functions and I do the same. I request

this yeah this gradient value here. And

now I've uh filled all of my beautiful lines of equations with value hopefully.

So that's the entire element routine. Um

and it's quite nice because this is uh both dimension agnostic and also agnostic to the specific element type since that's um within the cell values.

And this is going to work for if I swap it out for quadrillateral. This is still going to work if I swap it out for a different dimension. So it doesn't say

different dimension. So it doesn't say anything about if this is 1D 2D 3D. now.

So I can run any grit and cell value uh combination that works together through this type of code.

Um okay, I've assembled my local contribution and then I'm going to need to assemble my uh local contributions into the global uh system, right? So

we're going to do that next. We're going

to allocate a global stiffness matrix based on the dove handler which knows the connectivity between all the dos. So

it can give me the right sparse matrix.

um and also an uh a residual vector and then I need to allocate these local stiffness matrix and force vector because that was what I want to hand

into my element routine so I don't keep reallocating and trashing it. Uh we

create this assembler which is a helper to be a bit more efficient assembling into the spark system and then I can loop over all my cells. I have a nice loop for that which is called cell

iterator. So this is going to go over

iterator. So this is going to go over all the cells in this do handler uh and it's going to help me extract things like these are coordinates and the

degrees of freedoms belonging to that specific cell. I reinitialize my local

specific cell. I reinitialize my local um data structures and then I call my element routine. This is the one from

element routine. This is the one from the previous slide and you can see that here I can get the cell coordinates of this specific cell. Um I assemble the

contribution and that's it. Now I have my global system put together. Um

so we we call this assemble global. We

have global stiffness matrix and residual vector. Uh and I'm going to

residual vector. Uh and I'm going to want to add some boundary conditions uh before solving the problem. Right? And I

do that by a data structure called constraint handler which works very similar to the do handler. So now I I start initializing it. I'm going to add

a couple of constraints to it.

um and then I close it. So here we have simple der constraints um which say I want to add a directly boundary

condition to the field u on the outer boundary d omega and that's something I extract from the grid in the line above.

Um and the last part is saying I want this field to be zero on all of those boundaries. Um, but I could have more

boundaries. Um, but I could have more complex boundary conditions and make them dependent on the spatial coordinate or on time if I maybe want to ramp up my

load or something like that. So this is how we add boundary conditions. Um,

we need to add them to the system too.

So now the constraint handler has collected all the boundary conditions and then I want to modify the stiffness matrix and the residual vector according to those boundary conditions. Um and

well then I can solve it and I can go the bad way and use the backslash because this is a really small problem now. Um export the solution to VTK and

now. Um export the solution to VTK and look at it. So this is the entire code for our 101 example. And if this was a bit too fast for you, you can always go

back to the documentation and have a look at this with a lot of explanation.

Um yeah so I said uh that we write um element agnostic and dimension agnostic code and it is in fact really easy to swap out a couple of things. So if

instead of doing triangles now I want to do quadrilaterals these are the three lines of code that I need to change. So

all I do is when I generate my grid, I generate a grid with quadilaterals. Um

and then I use um interpolation that generates uh shape functions for quadrilaterals and quadrral rule on quadrilaterals. Um if I now build my

quadrilaterals. Um if I now build my cell values object based on this interpolation and quadriure rule and run the entire same code, I solve the

problem on a different element type. And

same thing if I want to change dimension that's all I need to change. I think

this is really convenient. I've used

this a lot because oftent times we test our models in 2D. We can often see a lot of features of them in 2D and then you want that fancy nice 3D example for your

paper once you know how to solve your problem well. And it's very nice uh

problem well. And it's very nice uh knowing that if you've designed a model that works in 3D then you can just run it through your code as well.

Um, of course I'm in solid mechanics, so I don't usually solve the heat equation.

Um, our 101 example is usually linear elasticity. And it's in fact not a lot

elasticity. And it's in fact not a lot that we would need to change if we would want to do linear elasticity here instead. Um, so if we look at the

instead. Um, so if we look at the element routine which specifies the physics, then this is what we had before. And if we uh want to swap that

before. And if we uh want to swap that out to do linear elasticity instead, it's still all the same structure, right? I still need to loop over the

right? I still need to loop over the quad point and over the test and trial functions, but I have different physics now. So, I'm going to want to set up a

now. So, I'm going to want to set up a fourth order stiffness tensor. And um

again, [clears throat] the tensor's talk is after lunch. Um and then I have a different residual vector and a different stiffness matrix. Uh but

that's everything I need to change. The

structure of the problem is still the same where this is also a linear uh problem to solve. So, oh, now I was pretty fast. Um, so now you have linear

pretty fast. Um, so now you have linear elasticity and there is an example for that in the docs as well. Um, so that if that is your favorite 101 example, that's where you can go. Um, we can of

course do a lot more advanced things with ferite. These were sort of the

with ferite. These were sort of the really uh simple building blocks. So a

couple of things that uh are nice to mention here is maybe that we can work with subdomains. So in this problem we

with subdomains. So in this problem we have parallel elasticity in this gray area and then just use linear elasticity

in the yellow area. Um and we can in fact add fields to this such that we get uh pressure field that we need for power

elasticity only on the gray domain. Um

and uh displacement field everywhere in the domain. And then maybe you can also

the domain. And then maybe you can also see that this is one of these quadilateral meshes where you end up with triangles in there. For such a simple geometry, maybe we could avoid that, but especially on more complex

geometries that's often difficult to avoid. And that's something that uh fite

avoid. And that's something that uh fite handles well as well. Maybe going to uh be a bit fast running over this, but I

think it's a nice showcase. So what we need to do then is we need to define different types of interpolation. So for

um the displacement field we're going to need a quadrilateral interpolation and a triangular interpolation because we have both of these element types and they're vector valued interpolation. So they're

raised to the power of the dimension here. Um and then we're also going to

here. Um and then we're also going to want interpolations for the pressure field. So that's also on plots and on

field. So that's also on plots and on tries. And same for the quadrron rules.

tries. And same for the quadrron rules.

we're going to need two of them. Um, and

now we can put that problem together in terms of degrees of freedom. Uh, we

start out by defining a do handler and then we add different uh subdomains to it, which we do by subdar. So what we need here is we need the subdomains for

the yellow part and the gray part, but also each element type has to be its own uh subdomain. So uh first step is to add

uh subdomain. So uh first step is to add the displacement field to the solid to the yellow domain. Um we do the quads first and then we do the same for the

triangles and then for uh the pro elastic part we also define subdomain. So now we're on the gray area. We again start with the

quadrilaterals but now we add two fields so that really this pressure field will only live on the gray domain in the end and I don't have to even think about it on the yellow domain. I can use my

regular linear elasticity routine that I just showed you and all I need to do is write an element routine for power elasticity and make sure the assembly

calls the right uh element routine for the right cell. Um let's do the same for triangles. Uh so this is an example of a

triangles. Uh so this is an example of a bit more complex do distribution pattern. Uh and something that

pattern. Uh and something that personally I'm quite proud is working and uh fully supported for about two years now.

um >> 15 minutes.

[laughter] >> Um we can do far more complicated things. Uh this is one of the examples

things. Uh this is one of the examples from the docs where Dennis has implemented a combination of fadite uh with uh time integration from

differential equations.jl

differential equations.jl um and where we're solving the Navia Stokes equations. So this is pretty cool

Stokes equations. So this is pretty cool and not so trivial.

Um and then I want to show a couple of more examples of things that we have done. We will hear about a lot of

done. We will hear about a lot of research being done with ferite today.

So um this first one I have been pointed on that I should show yesterday evening because this is something that uh I did at Charas when I was teaching an advanced finite element course as a TA

and the students had to implement um dynamic contact. So I implemented it as

dynamic contact. So I implemented it as well and uh generated some I know you want to see it again. um

go again uh and uh generated some animations of that with the mia in this case. I think it's really cool how you

case. I think it's really cool how you can see the waves going through the elastic body.

Um Dennis is doing some cardiac multifysics which I think is really cool. So um I believe our heart should be pumping

something like this right now. Um

there has been some early work with ferrite many years ago on gradient crystal plasticity. Um there's been some

crystal plasticity. Um there's been some more recent work on gradient crystal plasticity and fracture mechanics as well. So these are just a couple of

well. So these are just a couple of examples but um to make sure I run up here on time uh I want to mention a couple of our resources.

So uh we have uh documentation that probably those of you have worked with far are familiar with. It has a lot of examples and it also has a lot of explanations about different types of data structures we have uh and how

things are implemented. There are a couple of deaf docs and you're always welcome to contribute to the docs because those of us who have worked with faride for six years are actually not

the most qualified people to um explain to a beginner how to use it. Maybe um we have a Slack channel on the big Julia

Slack space called Ferite Fan and that's a more informal way of asking questions.

It's been quite active lately I would say. So please join the Slack channel if

say. So please join the Slack channel if you haven't already and if you run into problems, you can't figure something out, you have a weird error message, um post there. there is sometimes other

post there. there is sometimes other users and most of the time uh those of us who have developed the functionalities who are happy to answer

questions. Um for more formal things we

questions. Um for more formal things we have uh GitHub where we have our GitHub repository. You can always open an

repository. You can always open an issue. Uh especially we really

issue. Uh especially we really appreciate if you open issues when you think you've run into a bug. um you're

even more welcome to open a PR to fix the bug and become one of the 36 maybe the 37th 38th contributor. Um and there is also a discussion session on GitHub

where you can ask questions. So um

you're already at the conference but please do reach out to us if there is something you need to know, something you can't figure out or something that seems to be going wrong.

Um yeah and with that thank you all for your attention and I believe we have some time for questions and the coffee break after this.

>> Yes.

>> Yeah. Thank you for that introduction. I

learned a lot. I think um one thing I've been asking myself all the time is and you briefly mentioned this is lead isn't

so what is it actually doing by so I find myself putting it like everywhere but I don't know what it does >> oh okay what

>> yeah you mean uh the reimit of the cell values right ignitance and then it uh computes the um Jacobian and the derivatives of the

shape functions because they will depend on the specific nodal coordinate values of that specific cell like we can sit down and write down the equations later.

Um but that's what that does. Um it's

also I think maybe we can still find it in the code and look at it. It used to be a bit simpler code and now it's got a lot more functionality which also means the code has evolved to be a bit more

complex on that side. But uh yeah, basically what what it does is it uh computes these gradients so that they're

accurate for that specific cell, which is why you need to do it once on every cell. But uh no, no more. You

every cell. But uh no, no more. You

could also move it outside of the element routine and do it in your assembly loop instead, but you need to do it once for every cell. And if you do something like if you have a threaded

assembly um then you would need to use one cell values object uh per thread [laughter]

um because that mutates the cell values object um for the specific cell coordinates. So if it does that in

coordinates. So if it does that in parallel, uh each each worker will have to have their own I'm probably being trashed for for using the wrong

terminology. Now um

terminology. Now um >> I I will talk more about the in my talk later. attend [laughter]

later. attend [laughter] that object.

I have a web question because I know this assembly routine basically to assemble the jacobian right and can we somehow only provide routine to um

evaluate a residual and use enzyme to automatically get the jacobian.

>> Um [clears throat] oh this is an good question now. So um if you would just

question now. So um if you would just want to uh assemble the residual you would just leave out the part where you assemble the syphus matrix here right

and you can use something like forward diff for sure to differentiate that because forward tensors.jl JR works really smoothly with forward dip. Um I

don't know if we can use enzyme because I've never used that in this element routine. We're not using we're not

routine. We're not using we're not calling any complicated material routine that would have an iterative solver in it. In that case I would not recommend

it. In that case I would not recommend running that through an automatic differentiation tool because that explodes in complexity.

But maybe Valentine wants to comment. I

mean if if you if you have a linear silver you need to make sure that you also have um appropriate what we call a pool. So different chain rules and

pool. So different chain rules and enzyme has end so that you can actually avoid differentiating them so you just do the best thing.

This wants to say other things but you differentiate it only this local shape function then you get your I mean you never

create the local stiffness matrix you do and the rest is like outside of the process. that

that if you have like some complex plasticity routine that you were calling in order to let's say you needed to call uh an iterative solver in a plasticity

routine to compute the uh C tensor uh then you would want to skip that in uh automatic differentiation for sure >> but we have an example for doing this

automatic differentiation for a simple case at least >> true >> so that's it's possible maybe with enzyme we could even more.

>> We can we can try during the hackathon.

[laughter] >> It's a wonderful concept in computer science. Conservation of travel.

science. Conservation of travel.

[laughter] Just because I'm removing one part of the travel does not mean >> any more questions. Do you all want to break?

Oh, [clears throat] you have a question.

I'm I'm not sure I'm qualified to answer that.

>> Do you have any feature now that people would be added to fite? I will help you with your >> Oh, I Yeah, I think this is interesting actually because I realized that I

haven't uh done any PRs to fite in a while. I mean I I've contributed by

while. I mean I I've contributed by organizing conferences maybe but that also made me realize that um ever since I started this job here and I started writing a lot of code for corrosion

fatigue with face field fracture now I haven't there wasn't anything that I was lacking that I needed to implement um which is pretty cool in my opinion like I think we've made it pretty far on the

features on that side I'm not saying it's completely like there certainly is a lot of things you could implement Um

but personally there wasn't anything that I was lacking uh since January or so.

Loading...

Loading video analysis...