Nektar++
Loading...
Searching...
No Matches
Classes | Macros
TestAdvection.hpp File Reference
#include <UnitTests/MultiRegions/TestOp.hpp>
#include <MultiRegions/ElmtOps/Advection/AdvectionOp.hpp>

Go to the source code of this file.

Classes

class  TestAdvection< TData >
 
class  TestAdvectionFFT< TData >
 
class  TestAdvectionFFTInterleaved< TData >
 As TestAdvectionFFT, applied to the input interleaved at the vector width of the execution space, its blocks padded to that width. More...
 

Macros

#define TESTFLOAT(type, filename)
 
#define TESTDOUBLE(type, filename)
 
#define TEST(type, filename)
 
#define TEST_FFTFLOAT(type, filename)
 
#define TEST_FFTDOUBLE(type, filename)
 
#define TEST_FFT(type, filename)
 
#define TEST_FFT_INTERLEAVEDFLOAT(type, filename)
 
#define TEST_FFT_INTERLEAVEDDOUBLE(type, filename)
 
#define TEST_FFT_INTERLEAVED(type, filename)
 

Macro Definition Documentation

◆ TEST

#define TEST (   type,
  filename 
)
Value:
TESTFLOAT(type, filename) \
TESTDOUBLE(type, filename)
#define TESTFLOAT(type, filename)

Definition at line 280 of file TestAdvection.hpp.

335 : public TestAdvection<TData>
336{
337public:
338 TestAdvectionFFT() = default;
339};
340
341// clang-format off
342#if defined(NEKTAR_ENABLE_SINGLE_PRECISION)
343#define TEST_FFTFLOAT(type, filename) \
344 class type##float : public TestAdvectionFFT<float> \
345 { \
346 public: \
347 type##float() \
348 { \
349 meshName = filename; \
350 } \
351 };
352#else
353#define TEST_FFTFLOAT(type, filename)
354#endif
355#if defined(NEKTAR_ENABLE_DOUBLE_PRECISION)
356#define TEST_FFTDOUBLE(type, filename) \
357 class type : public TestAdvectionFFT<double> \
358 { \
359 public: \
360 type() \
361 { \
362 meshName = filename; \
363 } \
364 };
365#else
366#define TEST_FFTDOUBLE(type, filename)
367#endif
368#define TEST_FFT(type, filename) \
369 TEST_FFTFLOAT(type, filename) \
370 TEST_FFTDOUBLE(type, filename)
371// clang-format on
372
373TEST_FFT(QuadFFT, "run/square.xml")
374TEST_FFT(TriFFT, "run/tri.xml")
375TEST_FFT(SquareAllElementsFFT, "run/square_all_elements.xml")
376
377/// As TestAdvectionFFT, applied to the input interleaved at the vector width of
378/// the execution space, its blocks padded to that width.
379template <typename TData>
381{
382public:
383 TestAdvectionFFTInterleaved() = default;
384
385 void RunTestCase()
386 {
387 const std::string execStr(GlobalConfiguration::ExecStr());
388 this->fixt_in->ReshapeStorage(
389 NektarSpaces::GetVectorWidth<TData>(execStr), execStr);
391 }
392};
393
394// clang-format off
395#if defined(NEKTAR_ENABLE_SINGLE_PRECISION)
396#define TEST_FFT_INTERLEAVEDFLOAT(type, filename) \
397 class type##float : public TestAdvectionFFTInterleaved<float> \
398 { \
399 public: \
400 type##float() \
401 { \
402 meshName = filename; \
403 } \
404 };
405#else
406#define TEST_FFT_INTERLEAVEDFLOAT(type, filename)
407#endif
408#if defined(NEKTAR_ENABLE_DOUBLE_PRECISION)
409#define TEST_FFT_INTERLEAVEDDOUBLE(type, filename) \
410 class type : public TestAdvectionFFTInterleaved<double> \
411 { \
412 public: \
413 type() \
414 { \
415 meshName = filename; \
416 } \
417 };
418#else
419#define TEST_FFT_INTERLEAVEDDOUBLE(type, filename)
420#endif
421#define TEST_FFT_INTERLEAVED(type, filename) \
422 TEST_FFT_INTERLEAVEDFLOAT(type, filename) \
423 TEST_FFT_INTERLEAVEDDOUBLE(type, filename)
424// clang-format on
425
426TEST_FFT_INTERLEAVED(QuadFFTInterleaved, "run/square.xml")
427TEST_FFT_INTERLEAVED(SquareAllElementsFFTInterleaved,
428 "run/square_all_elements.xml")
#define TEST_FFT(type, filename)
#define TEST_FFT_INTERLEAVED(type, filename)
As TestAdvectionFFT, applied to the input interleaved at the vector width of the execution space,...

◆ TEST_FFT

#define TEST_FFT (   type,
  filename 
)
Value:
TEST_FFTFLOAT(type, filename) \
TEST_FFTDOUBLE(type, filename)
#define TEST_FFTFLOAT(type, filename)

Definition at line 368 of file TestAdvection.hpp.

◆ TEST_FFT_INTERLEAVED

#define TEST_FFT_INTERLEAVED (   type,
  filename 
)
Value:
TEST_FFT_INTERLEAVEDFLOAT(type, filename) \
TEST_FFT_INTERLEAVEDDOUBLE(type, filename)
#define TEST_FFT_INTERLEAVEDFLOAT(type, filename)

Definition at line 421 of file TestAdvection.hpp.

◆ TEST_FFT_INTERLEAVEDDOUBLE

#define TEST_FFT_INTERLEAVEDDOUBLE (   type,
  filename 
)

Definition at line 419 of file TestAdvection.hpp.

◆ TEST_FFT_INTERLEAVEDFLOAT

#define TEST_FFT_INTERLEAVEDFLOAT (   type,
  filename 
)

Definition at line 406 of file TestAdvection.hpp.

◆ TEST_FFTDOUBLE

#define TEST_FFTDOUBLE (   type,
  filename 
)

Definition at line 366 of file TestAdvection.hpp.

◆ TEST_FFTFLOAT

#define TEST_FFTFLOAT (   type,
  filename 
)

Definition at line 353 of file TestAdvection.hpp.

◆ TESTDOUBLE

#define TESTDOUBLE (   type,
  filename 
)

Definition at line 278 of file TestAdvection.hpp.

◆ TESTFLOAT

#define TESTFLOAT (   type,
  filename 
)

Definition at line 265 of file TestAdvection.hpp.