Page MenuHomec4science

contact_area.hh
No OneTemporary

File Metadata

Created
Wed, May 22, 14:07

contact_area.hh

//==================================================================//
// Percolation detection and characterization of contact clusters //
// To be integrated in FFT-BEM code //
// //
// V.A. Yastrebov, 2014 //
// Centre des Materiaux, CNRS, MINES ParisTech //
// //
// G. Anciaux, 2014 //
// EPFL, ENAC, IIC, LSMS //
//==================================================================//
#ifndef __CONTACT_AREA__
#define __CONTACT_AREA__
/* -------------------------------------------------------------------------- */
#include "map_2d.hh"
#include <vector>
#include "contact_cluster.hh"
/* -------------------------------------------------------------------------- */
class ContactArea : public Surface<int> {
/* ------------------------------------------------------------------------ */
/* Constructors/Destructors */
/* ------------------------------------------------------------------------ */
public:
ContactArea(UInt n, Real L);
template <typename T>
ContactArea(const Map2dSquare<T> & n);
~ContactArea();
/* ------------------------------------------------------------------------ */
/* Methods */
/* ------------------------------------------------------------------------ */
public:
//! TODO
void detectContactClusters();
//! TODO
void replaceColors(int from, int to);
//! TODO
void randomizeClusterID(UInt seed);
//! generate contact clusters
std::vector<ContactCluster> getContactClusters();
/* ------------------------------------------------------------------------ */
/* Accessors */
/* ------------------------------------------------------------------------ */
UInt getNumClusters(){return colors.size();};
/* ------------------------------------------------------------------------ */
/* Class Members */
/* ------------------------------------------------------------------------ */
private:
std::vector<int> colors;
};
#endif

Event Timeline