1 #ifndef EMM_OperatorsTest_HPP 2 #define EMM_OperatorsTest_HPP 22 if (!ok) cout <<
"reference array & array "<<fn<<
" have not same size.\n";
25 for (i=0;i<array.
getSize();i++) {
26 err=(fabs(arrayRef[i])>1)?fabs(1.-array[i]/arrayRef[i]):fabs(array[i]-arrayRef[i]);
30 if (errMax>1.e-4) cout <<
"Warning "<<array[indexMax]<<
" != "<<arrayRef[indexMax]<<
" err="<<errMax<<
"\n";
36 cout <<
"impossible to read "<<fn<<
"_ref.txt"<<
"\n";
const tUIndex & getSize() const
return the size of the array for reading
Definition: CORE_Array.h:1018
static tReal getRealInfinity()
get the infinity value
Definition: CORE_Object.h:633
#define tUSInt
Definition: types.h:28
#define tBoolean
Definition: types.h:139
virtual tBoolean getDataField(const tUSInt &index, tString &dataName, tUIndex &n, tDimension &dim, const float *&values) const
get the data field at index for saving data in vtk,txt,... files.
Definition: EMM_Operator.h:180
#define tDimension
Definition: EMM_Types.h:10
tBoolean loadFromFile(const tString &fileName)
load the steady array from file
Definition: EMM_Array.hpp:116
tBoolean saveToFile(const tString &fileName) const
save the steady array into file
Definition: EMM_Array.hpp:10
void setValues(const tUIndex &n, const Q *v)
set the values of the array by copying the n first values of pointer v
Definition: CORE_Array.h:445
static tReal compareDiscretizedData(const tUSInt &d, const tString &fn, const EMM_MagneticExcitationOperator &op, tUIndex &indexMax)
Definition: EMM_OperatorsTest.hpp:7
#define tUIndex
Definition: types.h:126
#define tString
Definition: types.h:135
This class is an operator of a E-MicromM package wich compute a magnetic excitation operator...
Definition: EMM_MagneticExcitationOperator.h:15
This class describes a general array.
Definition: EMM_Array.h:18
#define tReal
Definition: types.h:118