Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
E- and H-field interpolation tests, frequency domain interpolation (#80)
* Extract checks for field extraction being within FDTD grid checker into its own function * Tidy up a couple more docstrings * Create test_interpolate.cpp placeholder * Update interpolateFieldCentralE/H_TE/M error checks to match docstrings * Update docstrings to match function performance * Add unit test to build; add unit test for exception handling near edges of computational grid * Add matrix.h header to interpolate.h so it compiles * Update comments and docstring for checkInterpolationPoints * Update interpolate header with new functions * Add test for determineInterpScheme * Tests for determineInterpScheme * Add tests for cubic interpolation functions * Account for FLOP error in cubic interpolation tests * Update test for FLOP accuracy * Added interpolation function for Hx component in 3D * Update tdms/src/interpolate.cpp Co-authored-by: Tom Young <[email protected]> * Avoid redeclarations of arrays * Update error in test criteria * Fix determineInterpScheme's determination of right_cell_buffer * Create enums for identifiers, update coding practices * Refactor exception checks for checkInterpolationPoints * Refactor H-field interp into new file * Refactor interpolation methods into separate files for readability * Refactor E-field interpolation methods * Complete refactor of E-field interpolation methods. Complex data yet to be coded up * Function reorder * Add extra aux functions for the H-field * Create H-field x-component extraction functions * Update test framework with reworked enums * Update interpolate header * Add interpolation_methods include to interpolate * Looking into header redefinition issue * Header def fix2 * Add interpolation_methods to CMakeLists sources * Test typo, <=4 -> <4 * Correct interpolation_methods.cpp logic flagged by test * Update CMakeLists to identify new functions * Update tdms/include/interpolation_methods.h Co-authored-by: Tom Young <[email protected]> * Make interpScheme class and update syntaxes * docstrings -> headers * Update test framework with new interpolation checks * Revert changes to checkInterpolationPoints due to errors * Revert changes to test_interpolate.cpp * Add overloaded call operator to interpScheme class * Update interpScheme class and make constant instances * Don't double-define default value * Update docstring, impliment BLi to cell 0 if we want to include this functionality in future * Update test_interpolate get_value -> get_priority * unit tests... * Update names to constant refs * Update bandlimited interpolation test * Switch -1 -> +1s error in E-field component schemes * Hx component interpolation written * Add interpolation methods for other H-field components * Update CMakelists from main * fix bracket mismatch * Update BLi coeff sum tests * breakout scheme determination tests into separate file * typo in filenames * Breakout interpolation test functions into separate cases * move abs() mismatch * remove double test * E-field component tests * E-field test * E-field test compares errors to MATLAB * Update tdms/tests/unit/test_interp_fns.cpp Co-authored-by: Mosè Giordano <[email protected]> * update comments prior to tests * Add Bli vs Cubic test, update misleading docstring * further benchmarking bli vs cubic * add all tests, some fail to compete with MATLAB benchmark * include field and benchmark tests - currently fail * Update H/E field test readability * UPDATE: Adjust interpolation logic and process for H-field * Add definition of interpolateTimeDomainHField * H-field MATLAB benchmark test running * Update tdms/include/interpolate_Hfield.h Co-authored-by: Tom Young <[email protected]> * Update tdms/include/interpolate_Hfield.h Co-authored-by: Tom Young <[email protected]> * Update I -> nI and simila * Pull-out general, bulky comment on interpolate_Hfield.cpp * Condense assertions into single error check for each component * add BLi vs cubic test * Add CB{Lst,Mid,Fst} to cubic test * Fix failure-test case * Field interpolation tests updated: to decide on rtol condition? * remove repeated test * remove test that was duplicated in merge with main * Update tdms/tests/unit/test_interp_fns.cpp Co-authored-by: Sam Cunliffe <[email protected]> * Update tdms/tests/unit/test_interp_fns.cpp Co-authored-by: Sam Cunliffe <[email protected]> * Update tdms/tests/unit/test_interp_determination.cpp Co-authored-by: Sam Cunliffe <[email protected]> * Update tdms/src/interpolate_Efield.cpp Co-authored-by: Sam Cunliffe <[email protected]> * Update tdms/include/interpolate_Hfield.h Co-authored-by: Sam Cunliffe <[email protected]> * Apply suggestions from code review Co-authored-by: Sam Cunliffe <[email protected]> * Quick review comment fixes * Change index -> number_of_datapoints_to_left * Actually merge CMakeLists properly * Fix MATLAB scripts for benchmarking * Make BLi n_trials a const so memory assignment works on MacOS build? * Use rigorous delete syntax * Add complex interpolation overloads * Add freq-domain interpolation functions * Add namespacing to TDMS globals * Update electric_field with new globals.h * Update iterator with new globals convention * Update global refs in other files * Revert one that was meant to be an I * macOS → latest * Add MATLAB benchmark scripts * Remove unused globals * Fix namespacing issues with globals * Change interpScheme.interpolate to templated function * Revert "Change interpScheme.interpolate to templated function" This reverts commit e6d5a0c. * Fix complex typing * Clean up file docstrings and includes * General formatting tidyup * Typesetting for codebase * Fix macOS build (#117) * macOS → latest * Remove DOMP_ROOT flag * Remove DCXX_ROOT flag * Use dev build 4127d37 Co-authored-by: willGraham01 <[email protected]> * make macos tests consistent with main merge fix * Lowercase namespaces, include tidy up * check test namespacing and iterator includes * Update test --verbose output * Change to floats in multiplications * turns out it helps if you initalise to 0 before adding things * round > ceil * One j that should've been an i * Move E-field interpolation to templated types * Change H-field interpolation functions to templates * Remove redundant source files now we have templates * Remove unneccessary include * Add split/unified field tests to catch2 * Add newlines to things * Sam's comments #1 * Sam's comments #2 * Fix namespacing issue affecting tests * Peter's comments #1 * Peter's function suggestions * interpScheme additions post-merge * Interpolation Functions are now Field (Class) Methods (#130) * Fix tensor3D allocation * Add split-E-field interpolation as class method * Update split-H-field class with interpolation method * Overhaul ElectricField to have interpolation method * H-field has interpolation methods * Remove redundant headers now class methods are established * Update tdms/include/arrays.h Co-authored-by: Sam Cunliffe <[email protected]> * Move interpolation functionality higher up class hierarchy * Add overrides for MacOS compilation Co-authored-by: Sam Cunliffe <[email protected]> * Update the matlab benchmarking scripts with Peter's function suggestions * Fix E-field test offsets * Pre index overhaul * Index issue fixed, but H-field tests need examination * Fix mag field mismatches Co-authored-by: Tom Young <[email protected]> Co-authored-by: Mosè Giordano <[email protected]> Co-authored-by: Sam Cunliffe <[email protected]>
- Loading branch information