Back to index

salome-med  6.5.0
Public Member Functions | Static Private Member Functions | Private Attributes
SupportTester Class Reference
Collaboration diagram for SupportTester:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 SupportTester (const int *tabOfNodes, int nbOfElts, int nbOfNodesPerElt)
 SupportTester (const int *tabOfNodes, int nbOfElts, const int *nbOfNodesPerElt)
bool isIncludedAndNotAlreadyConsumed (const int *tabOfNodesOfTheElementToTest)
bool areAllEltsConsumed ()

Static Private Member Functions

static bool areEquivalent (const int *nodes1, const int *nodes2, int nbOfNodes)

Private Attributes

const int * _tabOfNodes
vector< int > _eltsActiveYet
vector< int > _lgthOfEltsActiveYet

Detailed Description

Definition at line 40 of file test_MEDMEM_poly3D.cxx.


Constructor & Destructor Documentation

SupportTester::SupportTester ( const int *  tabOfNodes,
int  nbOfElts,
int  nbOfNodesPerElt 
)

Definition at line 55 of file test_MEDMEM_poly3D.cxx.

                                                                                    :_tabOfNodes(tabOfNodes)
{
  for(int i=0;i<nbOfElts;i++)
    {
      _eltsActiveYet.push_back(i*nbOfNodesPerElt);
      _lgthOfEltsActiveYet.push_back(nbOfNodesPerElt);
    }
}
SupportTester::SupportTester ( const int *  tabOfNodes,
int  nbOfElts,
const int *  nbOfNodesPerElt 
)

Definition at line 64 of file test_MEDMEM_poly3D.cxx.

                                                                                           :_tabOfNodes(tabOfNodes)
{
  int offset=0;
  for(int i=0;i<nbOfElts;i++)
    {
      _eltsActiveYet.push_back(offset);
      _lgthOfEltsActiveYet.push_back(nbOfNodesPerElt[i]);
    }
}

Member Function Documentation

Definition at line 91 of file test_MEDMEM_poly3D.cxx.

{
  return _eltsActiveYet.size()==0;
}

Here is the caller graph for this function:

bool SupportTester::areEquivalent ( const int *  nodes1,
const int *  nodes2,
int  nbOfNodes 
) [static, private]

Definition at line 96 of file test_MEDMEM_poly3D.cxx.

{
  MEDMODULUSARRAY arr1(nbOfNodes,nodes1);
  MEDMODULUSARRAY arr2(nbOfNodes,nodes2);
  return arr1.compare(arr2)!=0;
}

Here is the caller graph for this function:

bool SupportTester::isIncludedAndNotAlreadyConsumed ( const int *  tabOfNodesOfTheElementToTest)

Definition at line 74 of file test_MEDMEM_poly3D.cxx.

{
  vector<int>::iterator iter2=_lgthOfEltsActiveYet.begin();
  for(vector<int>::iterator iter=_eltsActiveYet.begin();iter!=_eltsActiveYet.end();iter++)
    if(areEquivalent(_tabOfNodes+(*iter),tabOfNodesOfTheElementToTest,*iter2))
      {
        _eltsActiveYet.erase(iter);
        _lgthOfEltsActiveYet.erase(iter2);
        return true;
      }
    else
      {
        iter2++;
      }
  return false;
}

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

vector<int> SupportTester::_eltsActiveYet [private]

Definition at line 44 of file test_MEDMEM_poly3D.cxx.

vector<int> SupportTester::_lgthOfEltsActiveYet [private]

Definition at line 45 of file test_MEDMEM_poly3D.cxx.

const int* SupportTester::_tabOfNodes [private]

Definition at line 43 of file test_MEDMEM_poly3D.cxx.


The documentation for this class was generated from the following file: