Neko
0.8.1
A portable framework for high-order spectral element flow simulations
|
Implements type spectral_error_indicator_t. More...
Data Types | |
type | spectral_error_indicator_t |
Provides tools to calculate the spectral error indicator. More... | |
Functions/Subroutines | |
subroutine | spec_err_ind_init (this, u, v, w, coef) |
Constructor. More... | |
subroutine | spec_err_ind_free (this) |
Destructor. More... | |
subroutine | transform_to_spec_or_phys (u_hat, u, wk, coef, space) |
Transform a field u > u_hat into physical or spectral space the result of the transformation is in u_hat. More... | |
subroutine | spec_err_ind_get (this, coef) |
Transform and get the spectral error indicators. More... | |
subroutine | spec_err_ind_write (this, t) |
Write error indicators in a field file. More... | |
subroutine | calculate_indicators (this, coef, eind, sig, lnelt, LX1, LY1, LZ1, var) |
Wrapper for old fortran 77 subroutines. More... | |
subroutine | speri_var (this, est, sig, var, nell, xa, xb, LX1, LY1, LZ1) |
Calculate the indicator in a specified variable. More... | |
subroutine | speri_extrap (this, estx, sigx, coef11, coef, ix_st, ix_en, nyl, nzl) |
Extrapolate the Legendre spectrum from the last points. More... | |
subroutine | list_init3 (list, uu, vv, ww) |
Helper function to initialize field list to write. More... | |
subroutine | list_final3 (list) |
Helper function to finalize field list to write. More... | |
Implements type spectral_error_indicator_t.
|
private |
Wrapper for old fortran 77 subroutines.
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 327 of file spectral_error_indicator.f90.
|
private |
Helper function to finalize field list to write.
list | list to deallocate |
Deallocate field lists
Definition at line 687 of file spectral_error_indicator.f90.
|
private |
Helper function to initialize field list to write.
list | list to allocate |
uu | field to add to the list |
vv | field to add to the list |
ww | field to add to the list |
Initialize field lists
Definition at line 672 of file spectral_error_indicator.f90.
|
private |
Destructor.
finalize data related to writing
Definition at line 171 of file spectral_error_indicator.f90.
|
private |
Transform and get the spectral error indicators.
coef | type coef for mesh parameters and space |
Definition at line 264 of file spectral_error_indicator.f90.
subroutine spectral_error_indicator::spec_err_ind_init | ( | class(spectral_error_indicator_t), intent(inout) | this, |
type(field_t), intent(in), target | u, | ||
type(field_t), intent(in), target | v, | ||
type(field_t), intent(in), target | w, | ||
type(coef_t), intent(in) | coef | ||
) |
Constructor.
u | u velocity field |
v | v velocity field |
w | w velocity field |
coef | type with all geometrical variables |
call destructior
Assign the pointers
Initialize fields and copy data from proper one
Allocate arrays (Consider moving some to coef)
The following code has been lifted from Adams implementation
Initialize the list that holds the fields to write
Definition at line 108 of file spectral_error_indicator.f90.
|
private |
Write error indicators in a field file.
t | Current simulation time. |
Copy the element indicator into all points of the field
Write the file Remember that the list is already ponting to the fields that were just modified.
Definition at line 290 of file spectral_error_indicator.f90.
|
private |
Extrapolate the Legendre spectrum from the last points.
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 485 of file spectral_error_indicator.f90.
|
private |
Calculate the indicator in a specified variable.
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 362 of file spectral_error_indicator.f90.
|
private |
Transform a field u > u_hat into physical or spectral space the result of the transformation is in u_hat.
u_hat | transformed field |
u | field to transform |
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 220 of file spectral_error_indicator.f90.