## [Libmesh-users] Integration over parts of domain

 [Libmesh-users] Integration over parts of domain From: robert - 2010-12-02 13:32:31 ```Hi, I am trying to calculate crystal growth. In my model the growth rate of a crystal depends on the diffusion rates of the nutrients and on the surface of the crystal. The reaction rate R at each point can be calculated by: R = -D grad(c) where D is the diffusivity and c the concentration. Since the overall growth of the crystal depends on the surface, I have to integrate the above formula. My model is currently in 2D and I am using triangles with the following properties: System "Convection-Diffusion" Type "TransientLinearImplicit" Variables="u" Finite Element Types="LAGRANGE" Approximation Orders="FIRST" Let's look at one crystal: After several time steps a crystal has several triangles. Now I want to integrate the above formula over the boundary of the crystal. The crystal is growing at each time step. Thus, after each step I have to search the elements, which lie within the crystal now. How would you do this? I have problems in finding the right element boundaries and afterwards also in implementing an efficient routine which finds those elements which lie in the crystal now. thank you, Robert ```

 [Libmesh-users] Integration over parts of domain From: robert - 2010-12-02 13:32:31 ```Hi, I am trying to calculate crystal growth. In my model the growth rate of a crystal depends on the diffusion rates of the nutrients and on the surface of the crystal. The reaction rate R at each point can be calculated by: R = -D grad(c) where D is the diffusivity and c the concentration. Since the overall growth of the crystal depends on the surface, I have to integrate the above formula. My model is currently in 2D and I am using triangles with the following properties: System "Convection-Diffusion" Type "TransientLinearImplicit" Variables="u" Finite Element Types="LAGRANGE" Approximation Orders="FIRST" Let's look at one crystal: After several time steps a crystal has several triangles. Now I want to integrate the above formula over the boundary of the crystal. The crystal is growing at each time step. Thus, after each step I have to search the elements, which lie within the crystal now. How would you do this? I have problems in finding the right element boundaries and afterwards also in implementing an efficient routine which finds those elements which lie in the crystal now. thank you, Robert ```