OPALX (Object Oriented Parallel Accelerator Library for Exascal) master (dc2a29eed580)
OPALX
Loading...
Searching...
No Matches
endfieldmodel Namespace Reference

Classes

class  AsymmetricEnge
 
class  EndFieldModel
 
class  Enge
 
class  Tanh
 

Functions

bool GreaterThan (std::vector< int > v1, std::vector< int > v2)
 CompactVector helper function, used for sorting.
 
std::vector< std::vector< int > > CompactVector (std::vector< std::vector< int > > vec)
 
template<class TEMP_ITER >
bool IterableEquality (TEMP_ITER a_begin, TEMP_ITER a_end, TEMP_ITER b_begin, TEMP_ITER b_end)
 
template<class TEMP_CLASS >
bool IterableEquality (const TEMP_CLASS &a, const TEMP_CLASS &b)
 

Function Documentation

◆ CompactVector()

std::vector< std::vector< int > > endfieldmodel::CompactVector ( std::vector< std::vector< int > >  vec)

Definition at line 45 of file EndFieldModel.cpp.

References GreaterThan(), and IterableEquality().

Referenced by endfieldmodel::Enge::setEngeDiffIndices(), and endfieldmodel::Tanh::setTanhDiffIndices().

Here is the call graph for this function:

◆ GreaterThan()

bool endfieldmodel::GreaterThan ( std::vector< int >  v1,
std::vector< int >  v2 
)

CompactVector helper function, used for sorting.

Definition at line 36 of file EndFieldModel.cpp.

Referenced by CompactVector().

◆ IterableEquality() [1/2]

template<class TEMP_CLASS >
bool endfieldmodel::IterableEquality ( const TEMP_CLASS &  a,
const TEMP_CLASS &  b 
)

Definition at line 155 of file EndFieldModel.h.

References IterableEquality().

Here is the call graph for this function:

◆ IterableEquality() [2/2]

template<class TEMP_ITER >
bool endfieldmodel::IterableEquality ( TEMP_ITER  a_begin,
TEMP_ITER  a_end,
TEMP_ITER  b_begin,
TEMP_ITER  b_end 
)

Return a == b if a and b are same size and a[i] == b[i] for all i.

The following operations must be defined for TEMP_ITER it:

  • ++it prefix increment operator
  • (*it) (that is unary *, i.e. dereference operator)
  • it1 != it2 not equals operator
  • (*it1) != (*it2) not equals operator of dereferenced object

Call like e.g.
std::vector<int> a,b;
bool test_equal = IterableEquality(a.begin(), a.end(), b.begin(), b.end());
Can give a segmentation fault if a.begin() is not between a.begin() and a.end() (inclusive)

Definition at line 160 of file EndFieldModel.h.

Referenced by CompactVector(), and IterableEquality().