1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109
|
// -*- C++ -*-
// -------------------------------------------------------------------
// MAdLib - Copyright (C) 2008-2009 Universite catholique de Louvain
//
// See the Copyright.txt and License.txt files for license information.
// You should have received a copy of these files along with MAdLib.
// If not, see <http://www.madlib.be/license/>
//
// Please report all bugs and problems to <contrib@madlib.be>
//
// Authors: Gaetan Compere, Jean-Francois Remacle
// -------------------------------------------------------------------
#ifndef _H_MESHPARAMETERSMANAGER
#define _H_MESHPARAMETERSMANAGER
#include "MeshDataBaseInterface.h"
#include "MAdOperatorBase.h"
#include "MAdSingleton.h"
namespace MAd {
// -------------------------------------------------------------------
class MeshParametersManager {
public:
MeshParametersManager();
~MeshParametersManager() {};
void initialize();
void finalize();
// ------------------------------------------
public:
void setLowerLengthSqBound(double);
void setUpperLengthSqBound(double);
void setSliverTriBound(double);
void setSliverTetBound(double);
double getLowerLengthSqBound() const {return lowerLengthSqBound;}
double getUpperLengthSqBound() const {return upperLengthSqBound;}
double getSliverBound(int dim) const;
double getSliverBound(const pMesh) const;
double getSliverTriBound() const {return sliverTriQualityBound;}
double getSliverTetBound() const {return sliverTetQualityBound;}
private:
double lowerLengthSqBound, upperLengthSqBound;
double sliverTetQualityBound;
double sliverTriQualityBound;
// ------------------------------------------
public:
void setSliverPermissionInESplit (bool, double bound=-1.);
void setSliverPermissionInECollapse (bool, double bound=-1.);
bool getSliverPermissionInESplit () const {return sliverPermInESplit;}
bool getSliverPermissionInECollapse () const {return sliverPermInECollapse;}
double getSliverLowerLengthSqBound () const {return sliverLowerLengthSqBound;}
double getSliverUpperLengthSqBound () const {return sliverUpperLengthSqBound;}
private:
bool sliverPermInESplit, sliverPermInECollapse;
double sliverLowerLengthSqBound, sliverUpperLengthSqBound;
// ------------------------------------------
public:
void setNoSwapQuality(double noSwap) {noSwapQuality = noSwap;}
void setSwapMinImproveRatio(double ratio) {swapMinImproveRatio = ratio;}
double getNoSwapQuality() const {return noSwapQuality;}
double getSwapMinImproveRatio() const {return swapMinImproveRatio;}
private:
double noSwapQuality;
double swapMinImproveRatio;
// ------------------------------------------
public:
void setBigLength(double len) { bigLength = len; }
double getBigLength() { return bigLength; }
private:
double bigLength;
// ------------------------------------------
public:
void diagnostics() const;
};
// -------------------------------------------------------------------
typedef MAdSingleton<MeshParametersManager> MeshParametersManagerSgl;
}
#endif
|