Select Git revision
CommandLine.cpp
Forked from
gmsh / gmsh
Source project has a limited visibility.
-
Christophe Geuzaine authoredChristophe Geuzaine authored
pointsGenerators.cpp 25.14 KiB
// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
//
// See the LICENSE.txt file for license information. Please report all
// bugs and problems to the public mailing list <gmsh@geuz.org>.
#include "pointsGenerators.h"
#include "MTriangle.h"
#include "MQuadrangle.h"
#include "MTetrahedron.h"
#include "MHexahedron.h"
#include "MPrism.h"
#include "MPyramid.h"
// Points Generators
fullMatrix<double> gmshGeneratePointsLine(int order)
{
fullMatrix<double> points = gmshGenerateMonomialsLine(order);
if (order == 0) return points;
points.scale(2./order);
points.add(-1.);
return points;
}
fullMatrix<double> gmshGeneratePointsTriangle(int order, bool serendip)
{
fullMatrix<double> points = gmshGenerateMonomialsTriangle(order, serendip);
if (order == 0) return points;
points.scale(1./order);
return points;
}
fullMatrix<double> gmshGeneratePointsQuadrangle(int order, bool serendip)
{
fullMatrix<double> points = gmshGenerateMonomialsQuadrangle(order, serendip);
if (order == 0) return points;
points.scale(2./order);
points.add(-1.);
return points;
}
fullMatrix<double> gmshGeneratePointsTetrahedron(int order, bool serendip)
{
fullMatrix<double> points = gmshGenerateMonomialsTetrahedron(order, serendip);
if (order == 0) return points;
points.scale(1./order);
return points;
}
fullMatrix<double> gmshGeneratePointsHexahedron(int order, bool serendip)
{
fullMatrix<double> points = gmshGenerateMonomialsHexahedron(order, serendip);
if (order == 0) return points;
points.scale(2./order);
points.add(-1.);
return points;
}
fullMatrix<double> gmshGeneratePointsPrism(int order, bool serendip)
{
fullMatrix<double> points = gmshGenerateMonomialsPrism(order, serendip);