Neko 0.9.99
A portable framework for high-order spectral element flow simulations
|
Implements type spectral_error_t.
Data Types | |
type | spectral_error_t |
Provides tools to calculate the spectral error indicator. More... | |
Functions/Subroutines | |
subroutine | spectral_error_init (this, json, case) |
Constructor. | |
subroutine | spectral_error_init_from_attributes (this, coef) |
Actual constructor. | |
subroutine | spectral_error_free (this) |
Destructor. | |
subroutine | spectral_error_compute (this, t, tstep) |
Compute the spectral error indicator. | |
subroutine | transform_to_spec_or_phys (u_hat, u, wk, coef, space) |
Transform a field u to u_hat into physical or spectral space the result of the transformation is in u_hat. | |
subroutine | spectral_error_get_indicators (this, coef) |
Transform and get the spectral error indicators. | |
subroutine | spectral_error_write (this, t) |
Write error indicators in a field file. | |
subroutine | calculate_indicators (this, coef, eind, sig, lnelt, lx1, ly1, lz1, var) |
Wrapper for old fortran 77 subroutines. | |
subroutine | speri_var (this, est, sig, var, nell, xa, xb, lx1, ly1, lz1) |
Calculate the indicator in a specified variable. | |
subroutine | speri_extrap (this, estx, sigx, coef11, coef, ix_st, ix_en, nyl, nzl) |
Extrapolate the Legendre spectrum from the last points. | |
|
private |
coef | coef type |
eind | spectral indicator |
sig | coefficient of the exponential fit |
lnelt | number of elements |
LX1 | gll points in x |
LY1 | gll points in y |
LZ1 | gll points in z @paran var variable to calculate indicator |
Definition at line 366 of file spectral_error.f90.
|
private |
Copy the element indicator into all points of the field
Definition at line 229 of file spectral_error.f90.
|
private |
Definition at line 187 of file spectral_error.f90.
|
private |
coef | type coef for mesh parameters and space |
Definition at line 318 of file spectral_error.f90.
subroutine spectral_error::spectral_error_init | ( | class(spectral_error_t), intent(inout) | this, |
type(json_file), intent(inout) | json, | ||
class(case_t), intent(inout), target | case | ||
) |
Add keyword "fields" to the json so that the field writer
Definition at line 114 of file spectral_error.f90.
|
private |
coef | type with all geometrical variables. |
Initialize fields and copy data from proper one
Allocate arrays (Consider moving some to coef)
The following code has been lifted from Adam's implementation
Definition at line 137 of file spectral_error.f90.
|
private |
t | Current simulation time. |
Write the file Remember that the list is already ponting to the fields that were just modified.
Definition at line 343 of file spectral_error.f90.
|
private |
estx | spectral indicator |
sigx | coefficient of the exponential fit |
coef11 | legendre coefficients @paran coef legendre coefficients @paran ix_st argument list @paran ix_en argument list |
nyl | argument list |
nzl | argument list |
ix_st | argument list |
ix_en | argument list |
nyl | argument list |
nzl | argument list |
coef | Legendre coefficients; last SERI_NP columns |
coef11 | Legendre coefficients; first value coeff(1,1,1) |
estx | estimated error and decay rate |
sigx | estimated error and decay rate |
local variables
Definition at line 523 of file spectral_error.f90.
|
private |
est | spectral indicator |
sig | coefficient of the exponential fit |
nell | number of elements @paran var variable to calculate indicator @paran xa work array @paran xb work array |
LX1 | gll points in x |
LY1 | gll points in y |
LZ1 | gll points in z |
local variables
polynomial coefficients
Legendre coefficients; first value coeff(1,1,1)
copy of last SERI_NP columns of coefficients
estimated error
estimated decay rate
loop over elements
go to Legendre space (done in two operations) and square the coefficient
lower left corner
small value; nothing to od
extrapolate coefficients X - direction copy last SERI_NP collumns (or less if NX1 is smaller) SERI_ELR allows to exclude last row
get extrapolated values
Y - direction copy last SERI_NP collumns (or less if NY1 is smaller) SERI_ELR allows to exclude last row
get extrapolated values
Z - direction copy last SERI_NP collumns (or less if NZ1 is smaller) SERI_ELR allows to exclude last row
get extrapolated values
average
for testing
for testing; end
Definition at line 401 of file spectral_error.f90.
|
private |
u_hat | Transformed field (output). |
u | Field to transform (input). |
wk | Working field. |
coef | Type coef for mesh parameters. |
space | String that indicates which space to transform, "spec" or "phys". |
Define some constants
Copy field to working array
Definition at line 274 of file spectral_error.f90.