Auxiliary routines for test_diffusion program
Completes the operators for the support operator method - Turns map matrices qsupp into parallel gradient matrices - Establishes parallel divergence matrices psupp
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | comm |
MPI communicator |
||
| class(equilibrium_t), | intent(inout) | :: | equi |
Equilibrium |
||
| type(mesh_cart_t), | intent(in) | :: | mesh |
Mesh |
||
| type(mesh_cart_t), | intent(in) | :: | mesh_staggered |
Mesh at toroidally staggered (fwd) position |
||
| real(kind=FP), | intent(in), | dimension(mesh%get_n_points()) | :: | vol |
Flux box volumes |
|
| type(csrmat_t), | intent(inout) | :: | qsupp_fwd |
Map matrix on input, parallel gradient matrix on output (fwd direction) |
||
| type(csrmat_t), | intent(inout) | :: | qsupp_bwd |
Map matrix on input, parallel gradient matrix on output (bwd direction) |
||
| type(csrmat_t), | intent(out), | allocatable | :: | psupp_fwd |
Parallel divergence matrix (fwd direction) |
|
| type(csrmat_t), | intent(out), | allocatable | :: | psupp_bwd |
Parallel divergence matrix (bwd direction) |
Parallel diffusion according to Shortley-Weller scheme
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | comm |
MPI communicator |
||
| type(mesh_cart_t), | intent(in) | :: | mesh |
Mesh |
||
| type(csrmat_t), | intent(in) | :: | qnaive_fwd |
Map matrix (fwd direction) |
||
| type(csrmat_t), | intent(in) | :: | qnaive_bwd |
Map matrix (bwd direction) |
||
| real(kind=FP), | intent(in), | dimension(mesh%get_n_points()) | :: | ds_fwd |
Distances along magnetic fiedl line to fwd mesh |
|
| real(kind=FP), | intent(in), | dimension(mesh%get_n_points()) | :: | ds_bwd |
Distances along magnetic fiedl line to bwd mesh |
|
| real(kind=FP), | intent(in), | dimension(mesh%get_n_points()) | :: | u |
Variable u |
|
| real(kind=FP), | intent(out), | dimension(mesh%get_n_points()) | :: | du |
Parallel diffusion of variable u |
Parallel gradient (from full to staggered mesh)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | comm |
MPI communicator |
||
| type(mesh_cart_t), | intent(in) | :: | mesh |
Mesh |
||
| type(mesh_cart_t), | intent(in) | :: | mesh_staggered |
Mesh at toroidally staggered (fwd) position |
||
| type(csrmat_t), | intent(in) | :: | qsupp_fwd |
Parallel gradient matrix (fwd direction) |
||
| type(csrmat_t), | intent(in) | :: | qsupp_bwd |
Parallel gradient matrix (fwd direction) |
||
| real(kind=FP), | intent(in), | dimension(mesh%get_n_points()) | :: | u |
Variable u |
|
| real(kind=FP), | intent(out), | dimension(mesh_staggered%get_n_points()) | :: | du |
Parallel gradient of variable u on staggered grid |
Parallel divergence (from staggered to full mesh)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | comm |
MPI communicator |
||
| type(mesh_cart_t), | intent(in) | :: | mesh |
Mesh |
||
| type(mesh_cart_t), | intent(in) | :: | mesh_staggered |
Mesh at toroidally staggered (fwd) position |
||
| type(csrmat_t), | intent(in) | :: | psupp_fwd |
Parallel divergence matrix (fwd direction) |
||
| type(csrmat_t), | intent(in) | :: | psupp_bwd |
Parallel divergence matrix (fwd direction) |
||
| real(kind=FP), | intent(in), | dimension(mesh_staggered%get_n_points()) | :: | u |
Variable u on staggered grid |
|
| real(kind=FP), | intent(out), | dimension(mesh%get_n_points()) | :: | du |
Parallel divergence of u on full grid |
Parallel divergence (from staggered to full mesh)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | comm |
MPI communicator |
||
| type(mesh_cart_t), | intent(in) | :: | mesh |
Mesh |
||
| type(mesh_cart_t), | intent(in) | :: | mesh_staggered |
Mesh at toroidally staggered (fwd) position |
||
| type(csrmat_t), | intent(in) | :: | qsupp_fwd |
Parallel gradient matrix (fwd direction) |
||
| type(csrmat_t), | intent(in) | :: | qsupp_bwd |
Parallel gradient matrix (fwd direction) |
||
| type(csrmat_t), | intent(in) | :: | psupp_fwd |
Parallel divergence matrix (fwd direction) |
||
| type(csrmat_t), | intent(in) | :: | psupp_bwd |
Parallel divergence matrix (fwd direction) |
||
| real(kind=FP), | intent(in), | dimension(mesh%get_n_points()) | :: | u |
Variable u |
|
| real(kind=FP), | intent(out), | dimension(mesh%get_n_points()) | :: | du |
Parallel diffusion |
Computes L1, L2 and Lsup norm of solution Integretaion is performed with weighing of FCI flux box volumes
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | comm |
MPI communicator |
||
| type(mesh_cart_t), | intent(in) | :: | mesh |
Mesh |
||
| real(kind=FP), | intent(in), | dimension(mesh%get_n_points()) | :: | vol |
Flux box volumes |
|
| real(kind=FP), | intent(in), | dimension(mesh%get_n_points()) | :: | u |
Variable u |
|
| real(kind=FP), | intent(out) | :: | nrm1 |
L1 Norm |
||
| real(kind=FP), | intent(out) | :: | nrm2 |
L2 Norm |
||
| real(kind=FP), | intent(out) | :: | nrm_max |
Supremumsnorm |