PSCF v1.1
|
Comparator for fields in symmetry-adapted basis format. More...
#include <BFieldComparison.h>
Public Member Functions | |
BFieldComparison (int begin=0) | |
Constructor. More... | |
![]() | |
FieldComparison (int begin=0) | |
Default constructor. More... | |
double | compare (DArray< double > const &a, DArray< double > const &b) |
Compare individual fields. More... | |
double | compare (DArray< DArray< double > > const &a, DArray< DArray< double > > const &b) |
Compare arrays of fields associated with different monomer types. More... | |
double | maxDiff () const |
Return the precomputed maximum element-by-element difference. More... | |
double | rmsDiff () const |
Return the precomputed root-mean-squared difference. More... | |
Comparator for fields in symmetry-adapted basis format.
Definition at line 23 of file pscf/crystal/BFieldComparison.h.
Pscf::Pspc::BFieldComparison::BFieldComparison | ( | int | begin = 0 | ) |
Constructor.
The basis function with index 0 in a symmetry adapted basis is always a spatially homogeneous function, i.e., a constant. In some situations, we may be interested in determining whether two fields are equivalent to within a constant.
Set begin = 0, which is the default, to include the coefficient of the first basis function in the comparison, thus determining how close to fields are to being strictly equal.
Set begin = 1 to exclude the coefficient of the first basis function, thus comparing only deviatoric parts of the fields.
begin | index of first element to include in comparison. |
Definition at line 13 of file pscf/crystal/BFieldComparison.cpp.