Newer
Older
Norihiro Watanabe
committed
/**
Norihiro Watanabe
committed
* \copyright
* Copyright (c) 2012-2020, OpenGeoSys Community (http://www.opengeosys.org)
Norihiro Watanabe
committed
* Distributed under a Modified BSD License.
* See accompanying file LICENSE.txt or
* http://www.opengeosys.org/project/license
*
*/
#include "LineRule2.h"
#include "MeshLib/Node.h"
namespace MeshLib {
const unsigned LineRule2::edge_nodes[1][2] =
{
Norihiro Watanabe
committed
};
double LineRule2::computeVolume(Node const* const* _nodes)
{
return sqrt(MathLib::sqrDist(_nodes[0]->getCoords(), _nodes[1]->getCoords()));
Norihiro Watanabe
committed
}
bool LineRule2::isPntInElement(Node const* const* nodes,
MathLib::Point3d const& pnt, double eps)
Norihiro Watanabe
committed
{
double const dist = MathLib::calcProjPntToLineAndDists(
pnt.getCoords(), nodes[0]->getCoords(), nodes[1]->getCoords(), tmp,
tmp_dst);
Norihiro Watanabe
committed
}
unsigned LineRule2::identifyFace(Node const* const* _nodes, Node* nodes[1])
{
Norihiro Watanabe
committed
}
ElementErrorCode LineRule2::validate(const Element* e)
{
error_code[ElementErrorFlag::ZeroVolume] = hasZeroVolume(*e);
Norihiro Watanabe
committed
}
} // end namespace MeshLib