1#ifndef __FIBER_GRID_TYPES_TRIANGULARSURFACE_HPP
2#define __FIBER_GRID_TYPES_TRIANGULARSURFACE_HPP
4#include "gridtypesDllApi.h"
5#include "fish/fiber/grid/Grid.hpp"
6#include "elementary/eagle/PhysicalSpace.hpp"
7#include "fish/fiber/field/Cell.hpp"
108static bool addVerticesAndConnectivity(
Grid&G,
146static const char NormalVectorFieldName[];
155 RefPtr<Field> getVertexNormalField(
const string&FieldName = NormalVectorFieldName);
159 RefPtr<Field> F = getVertexNormalField(NormalVectorFieldName);
175 return CoordField->getData();
187 return CellField->getData();
202 bool Discardable =
false)
204 return create(theGrid, Vertices,
Triangles, Discardable, Discardable);
208 template<
int N,
class T>
209 RefPtr<Fiber::MemBase> getTriangularFieldData(
const std::string& fieldname,
210 RefPtr<FragmentID> fragID =
NullPtr())
212 RefPtr<Fiber::Field> f = (*CellsAsVertices)(fieldname);
215 Verbose(0) << fieldname <<
": NullPtr() in TriangularSurface::getTriangularFieldData [f]";
219 RefPtr<Fiber::MemArray<N,T> > mem = f->getData(fragID);
222 Verbose(0) << fieldname <<
": NullPtr() in TriangularSurface::getTriangularFieldData [mem]";
229 RefPtr<CoordsArray_t> getNormals(
const string&FieldName = NormalVectorFieldName)
231 RefPtr<Field> N = getVertexNormalField( FieldName );
238 RefPtr<Field> getTriangleBaryCenters();
240static RefPtr<CoordsArray_t>
241 computeBaryCenters(
const RefPtr<CoordsArray_t>&Pts,
242 const RefPtr<CellArray_t> &Cells,
243 const MemBase::Creator_t&Crec =
NullPtr() );
245static RefPtr<CoordsArray_t>
246 computeCircumCircleCenter(
const RefPtr<CoordsArray_t>&Pts,
247 const RefPtr<CellArray_t> &Cells,
248 const MemBase::Creator_t&Crec =
NullPtr() );
250static RefPtr<CoordsArray_t>
251 computeInCircleCenter(
const RefPtr<CoordsArray_t>&Pts,
252 const RefPtr<CellArray_t> &Cells,
253 const MemBase::Creator_t&Crec =
NullPtr() );
259static RefPtr<LineSet::LinesetArray_t>
260 computeOutLinesViaTriangles(
const RefPtr<CoordsArray_t>&Pts,
261 const RefPtr<CellArray_t> &Cells,
262 const MemBase::Creator_t&Crec =
NullPtr() );
267 LineSet OutLines(
const RefPtr<Grid>&OutputGrid);
constexpr complex< _Tp > & operator=(const _Tp &)
An iterator with an optional DataCreator, which is just a class to intercept creation of data along a...
Definition CreativeIterator.hpp:34
A Grid is a set of Skeleton objects, each of them accessed via some unique SkeletonID object.
Definition Grid.hpp:60
Class for N-dimensional MultiArrays with MemCore memory management.
Definition MemArray.hpp:34
Identifier for Skeletons within a Grid.
Definition SkeletonID.hpp:24
Given a fragmented field of curvilinear coordinates, (3D array of coordinates), build a uniform Grid ...
Definition FAQ.dox:2
std::string to_string(const span< char > &s)
A type describing an n-dimensional simplex cell.
Definition Cell.hpp:70
A triangular surface stored on a Grid.
Definition TriangularSurface.hpp:43
RefPtr< Representation > CellsAsVertices
Collection of all fields given on triangles.
Definition TriangularSurface.hpp:71
RefPtr< Field > CellField
Field for the triangle indices.
Definition TriangularSurface.hpp:66
static SkeletonID ID()
2D objects of index depth 1 .
Definition TriangularSurface.hpp:131
RefPtr< CoordsArray_t > getCoords() const
Get the coordinate data array.
Definition TriangularSurface.hpp:170
RefPtr< CellArray_t > getCells() const
Get the triangle data array.
Definition TriangularSurface.hpp:182
RefPtr< Field > CoordField
Field for the vertex coordinates.
Definition TriangularSurface.hpp:59
RefPtr< Representation > CartesianVertices
Collection of all fields given on vertices relative to cartesian coordinates.
Definition TriangularSurface.hpp:69
RefPtr< Field > VertexNormalField
internal storage of the vertex normal field if existent Use getVertexNormalField() to compute the nor...
Definition TriangularSurface.hpp:63