| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | N | |||
| integer, | intent(in) | :: | ii | |||
| integer, | intent(in) | :: | jj | |||
| integer, | intent(in) | :: | dii | |||
| integer, | intent(in) | :: | djj | |||
| real(kind=wp), | intent(in), | dimension(:) | :: | xy |
Assemble the global stiffness matrix based on element connectivity
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in), | dimension(:) | :: | points | Array of nodal coordinates |
|
| integer, | intent(in), | dimension(:,:) | :: | cells | Element connectivity |
|
| real(kind=wp), | intent(in) | :: | diff | Diffusivity coefficient [m/s^2] |
||
| real(kind=wp), | intent(in) | :: | vel | Velocity [m/s] |
||
| real(kind=wp), | intent(out), | dimension(:,:) | :: | GlobalA | Global Stiffness matrix |
Set boundary conditions in GlobalA and GlobalB using two Dirchlet boundaries
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in), | dimension(:) | :: | points | Array of nodal coordinates |
|
| real(kind=wp), | intent(out), | dimension(:) | :: | GlobalB | Global RHS Vector |
|
| real(kind=wp), | intent(out), | dimension(:,:) | :: | GlobalA | Global Mass Matrix |
Routine to calculate the elemental mass/stiffness matrix based on the derivatives of the basis functions.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | N | Number of nodes in basis function |
||
| integer, | intent(in) | :: | d1 | Derivative of the first basis function |
||
| integer, | intent(in) | :: | d2 | Derivative of the second basis function |
||
| real(kind=wp), | intent(in), | dimension(N) | :: | xy | Coordinates of the 1D line element |
Output elemental matrix
This routine initalizes the global stiffness matrix, global rhs vector, and global solution vector based on the number of nodes in the system
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | num_nodes | The number of nodes in the system |
||
| real(kind=wp), | intent(out), | dimension(:,:), allocatable | :: | GlobalA | Global mass matrix |
|
| real(kind=wp), | intent(out), | dimension(:), allocatable | :: | GlobalB | Global RHS Vector |
|
| real(kind=wp), | intent(out), | dimension(:), allocatable | :: | GlobalX | Global solution vector |