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
|
// -*- 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_ANISOMESHSIZE
#define _H_ANISOMESHSIZE
#include "MeshSizeBase.h"
namespace MAd {
// -------------------------------------------------------------------
// This class stores an anisotropic mesh size (prescribed edge length)
// -------------------------------------------------------------------
// -------------------------------------------------------------------
class AnisoMeshSize : public MeshSizeBase {
public:
AnisoMeshSize(double e[3][3], double _h[3]);
AnisoMeshSize(double e[3], double hDir, double hTg);
AnisoMeshSize(double h=1.);
AnisoMeshSize(const AnisoMeshSize &);
~AnisoMeshSize() {};
public:
MeshSizeType getType() const;
MAdMetric getMetric() const { return M; }
void intersect(const pMSize pMS0, const pMSize pMS1);
void interpolate(const pMSize, const pMSize, double);
void interpolate(const pMSize, const pMSize, const pMSize,
double, double);
void interpolate(const pMSize, const pMSize, const pMSize, const pMSize,
double, double, double);
double direction(int i, double dir[3]) const;
double size(int i=0) const;
void sizes(double _h[3]) const;
// get the square of the norm in the metric
double normSq(const double vec[3]) const;
double lengthSqInDir(const double dir[3]) const ;
// get the cosine of the angle with the direction of the minimal size
double angleWithDir0(const double dir[3]) const;
double getMeanLength() const;
double getMinLength() const;
double getMaxLength() const;
void scale(int, double);
void scale(double);
void print(std::string name="") const;
private:
MAdMetric M;
};
// -------------------------------------------------------------------
}
#endif
|