Choral
|
MODULE FOR DIFFUSION PROBLEMS More...
Data Types | |
interface | l2_product |
L2 product of a function with the basis functions. More... | |
Functions/Subroutines | |
subroutine, public | diffusion_matrix_pattern (g, X_h, qdm) |
Define the sparsity pattern for diffusion matrices More... | |
subroutine, public | diffusion_massmat (mass, a, X_h, qdm, dofToDof) |
Assemble the mass matrix of the bilinear product: More... | |
subroutine, public | diffusion_stiffmat (stiff, b, X_h, qdm, dofToDof) |
Assemble the stiffness matrix of the bilinear product: More... | |
subroutine, public | diffusion_neumann_rhs (rhs, g, X_h, quad_type, f) |
L2 scalar product of a scalar function \( g \) with the basis functions fo the finite element space \( X_h \) on \(\Gamma_f \subset \partial\Omega\) a part of the domain boundary. More... | |
subroutine, public | diffusion_dirichlet (K, rhs, g, X_h, rho, f) |
DIRICHLET BOUNDARY CONDITION FOR A DIFFUSION PROBLEM More... | |
subroutine | fespace_l2_product (FV, f, X_h, qdm) |
L2 Product of a scalar function \( f:~\R^3 \mapsto \R\) with the basis functions of a scalar finite element space. More... | |
subroutine, public | diffusion_massmat_vect (mass, b, X_h, qdm, dofToDof) |
Assemble the mass matrix of the bilinear product: More... | |
subroutine, public | diffusion_mixed_divmat (divMat, X_s, X_v, qdm) |
Assemble the matrix of the bilinear product: More... | |
MODULE FOR DIFFUSION PROBLEMS
A module for diffusion equations of the form
\(~~~~~~~~~~~~~~~~~~\) \(~~~~~~~~~ -\dv(B(x) \nabla u) + \rho(x) u = f \)
with \( B(x)\) a diffusivity tensor.
Tutorial examples:
subroutine, public diffusion::diffusion_dirichlet | ( | type(csr), intent(inout) | K, |
real(rp), dimension(:), intent(inout) | rhs, | ||
procedure(r3tor) | g, | ||
type(fespace), intent(in) | X_h, | ||
real(rp), intent(in) | rho, | ||
procedure(r3tor), optional | f | ||
) |
DIRICHLET BOUNDARY CONDITION FOR A DIFFUSION PROBLEM
Given:
\[ \Gamma_f = \partial\Omega \cap \{f\ge 0\}, \]
\[ K U = \text{rhs}, \]
Penalise the linear system on the lines i associated with a finite element node \( x\in \Gamma_f \):
INPUT:
OUTPUT:
Definition at line 656 of file diffusion.F90.
subroutine, public diffusion::diffusion_massmat | ( | type(csr), intent(inout) | mass, |
procedure(r3tor) | a, | ||
type(fespace), intent(in) | X_h, | ||
type(quadmesh), intent(in) | qdm, | ||
type(graph), intent(in), optional | dofToDof | ||
) |
Assemble the mass matrix of the bilinear product:
\( (u,v) \mapsto \int_O a(x)~ u(x) v(x) \dx ~~\in\R\)
OUTPUT:
INPUT :
Definition at line 168 of file diffusion.F90.
subroutine, public diffusion::diffusion_massmat_vect | ( | type(csr), intent(inout) | mass, |
procedure(r3xr3xr3tor) | b, | ||
type(fespace), intent(in) | X_h, | ||
type(quadmesh), intent(in) | qdm, | ||
type(graph), intent(in), optional | dofToDof | ||
) |
Assemble the mass matrix of the bilinear product:
\( (p,q) \mapsto \int_O b(x, p(x), q(x)) \dx ~~\in\R\)
OUTPUT:
INPUT :
Definition at line 899 of file diffusion.F90.
subroutine, public diffusion::diffusion_matrix_pattern | ( | type(graph), intent(inout) | g, |
type(fespace), intent(in) | X_h, | ||
type(quadmesh), intent(in) | qdm | ||
) |
Define the sparsity pattern for diffusion matrices
It is given by the connectivity graph Dof –> Dof:
between the degrees of freedom of the finite element space \( X_h \) on the mesh \( \T \).
DOF_i is in relation with DOF_j if:
OUTPUT:
INPUT :
Definition at line 96 of file diffusion.F90.
subroutine, public diffusion::diffusion_mixed_divmat | ( | type(csr), intent(inout) | divMat, |
type(fespace), intent(in) | X_s, | ||
type(fespace), intent(in) | X_v, | ||
type(quadmesh), intent(in) | qdm | ||
) |
Assemble the matrix of the bilinear product:
\( (u,p) \mapsto \int_O u(x) \dv p(x) \dx ~~\in\R\)
OUTPUT:
INPUT :
Definition at line 1164 of file diffusion.F90.
subroutine, public diffusion::diffusion_neumann_rhs | ( | real(rp), dimension(:), allocatable | rhs, |
procedure(r3tor) | g, | ||
type(fespace), intent(in) | X_h, | ||
integer, intent(in) | quad_type, | ||
procedure(r3tor), optional | f | ||
) |
L2 scalar product of a scalar function \( g \) with the basis functions fo the finite element space \( X_h \) on \(\Gamma_f \subset \partial\Omega\) a part of the domain boundary.
INPUT:
OUTPUT:
Definition at line 590 of file diffusion.F90.
subroutine, public diffusion::diffusion_stiffmat | ( | type(csr), intent(inout) | stiff, |
procedure(r3xr3xr3tor) | b, | ||
type(fespace), intent(in) | X_h, | ||
type(quadmesh), intent(in) | qdm, | ||
type(graph), intent(in), optional | dofToDof | ||
) |
Assemble the stiffness matrix of the bilinear product:
\( (u,v) \mapsto \int_O b(x, \nabla u(x), \nabla v(x)) \dx ~~\in\R\)
OUTPUT:
INPUT :
NOTE : every cell \(K \subset O\) is either
In the 2nd and 3rd cases : \( \nabla u(x)\) is in the tangent gradient (in the tangent space).
Definition at line 366 of file diffusion.F90.
|
private |
L2 Product of a scalar function \( f:~\R^3 \mapsto \R\) with the basis functions of a scalar finite element space.
INPUT
OUTPUT:
Definition at line 741 of file diffusion.F90.