Skip to content
Snippets Groups Projects
Commit cd5ba8b8 authored by Dmitri Naumov's avatar Dmitri Naumov Committed by Christoph Lehmann
Browse files

[NL] Add shape matrices for point elements.

parent ae03dd34
No related branches found
No related tags found
No related merge requests found
/**
* \copyright
* Copyright (c) 2012-2015, OpenGeoSys Community (http://www.opengeosys.org)
* Distributed under a Modified BSD License.
* See accompanying file LICENSE.txt or
* http://www.opengeosys.org/project/license
*
*/
namespace NumLib
{
template <class T_X, class T_N>
void ShapePoint1::computeShapeFunction(const T_X& /*r*/, T_N& N)
{
N[0] = 1;
}
}
/**
* \copyright
* Copyright (c) 2012-2015, OpenGeoSys Community (http://www.opengeosys.org)
* Distributed under a Modified BSD License.
* See accompanying file LICENSE.txt or
* http://www.opengeosys.org/project/license
*
*/
#ifndef SHAPEPOINT1_H_
#define SHAPEPOINT1_H_
#include "MeshLib/Elements/Point.h"
namespace NumLib
{
/// Shape function for a point element in natural coordinates.
class ShapePoint1
{
public:
/// Evaluate the shape function at the given point
///
/// @param [in] r point coordinates
/// @param [out] N a vector of calculated shape function.
template <class T_X, class T_N>
static void computeShapeFunction(const T_X& r, T_N& N);
using MeshElement = MeshLib::Point;
static const std::size_t DIM = MeshElement::dimension;
static const std::size_t NPOINTS = MeshElement::n_all_nodes;
};
}
#include "ShapePoint1-impl.h"
#endif // SHAPEPOINT1_H_
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment