necpp icon indicating copy to clipboard operation
necpp copied to clipboard

Frequency loop don't work with plane wave excitation

Open jpadam opened this issue 8 years ago • 4 comments

In nec_context.cpp excitation_loop never return FREQ_LOOP_CONTINUE, only FREQ_PRINT_NORMALIZATION if m_excitation_type is not 0 or 4 (which is the case of the plane wave)

jpadam avatar Feb 16 '17 17:02 jpadam

Will look into this. Can you send a small example piece of code, with the expected output.

tmolteno avatar Aug 21 '17 23:08 tmolteno

Issue confirmed as a bug. I have a test case in ./testharness/data/plane_wave_excitation.nec.

tmolteno avatar Aug 28 '17 10:08 tmolteno

Sorry for my late answer. I confirm that the test case you added reproduce the bug I observed.

jpadam avatar Sep 06 '17 15:09 jpadam

nfrq is only checked for VOLTAGE, CURRENT and VOLTAGE_DISC excitation.

https://github.com/tmolteno/necpp/blob/870f110875ef7e1fc951cbd489fde20ac9a93284/src/nec_context.cpp#L1754-L1768

Oh, and test_manager now crashes when trying to dereference rp, which is a nullptr https://github.com/tmolteno/necpp/blob/870f110875ef7e1fc951cbd489fde20ac9a93284/src/nec_context_tb.cpp#L140-L141

StefanBruens avatar Feb 19 '23 15:02 StefanBruens