40#ifndef GEOGRAM_VORONOI_INTEGRATION_SIMPLEX
41#define GEOGRAM_VORONOI_INTEGRATION_SIMPLEX
136 const double* points,
140 nb_points_ = nb_points;
141 points_stride_ =
index_t(dimension);
144 spinlocks_ = spinlocks;
177 return varying_background_;
218 return points_ + i * points_stride_;
229 return frames_ + i * nb_comp_per_frame_;
238 const double* points_;
242 const double* frames_;
244 bool varying_background_;
247 typedef SmartPointer<IntegrationSimplex>
248 IntegrationSimplex_var;
#define geo_debug_assert(x)
Verifies that a condition is met.
Common include file, providing basic definitions. Should be included before anything else by all head...
Internal representation of vertices in GenericVoronoiDiagram.
Base class for reference-counted objects.
Computes an objective function and its gradient over a restricted Voronoi diagram.
void set_points_and_gradient(coord_index_t dimension, index_t nb_points, const double *points, double *g, Process::SpinLockArray *spinlocks=nullptr)
Sets the input points and the location where the computed gradient will be stored.
const double * point(index_t i) const
Gets a point by index.
bool volumetric() const
Tests whether this IntegrationSimplex is volumetric.
virtual void reset_thread_local_storage()
Before starting computation, resets thread local storage variables.
virtual double eval(index_t center_vertex_index, const GEOGen::Vertex &v0, const GEOGen::Vertex &v1, const GEOGen::Vertex &v2, index_t t, index_t t_adj=index_t(-1), index_t v_adj=index_t(-1))=0
Computes the contribution of a given integration simplex to the function and its gradient....
IntegrationSimplex(const Mesh &mesh, bool volumetric, index_t nb_frames, index_t nb_comp_per_frame, const double *frames)
Constructs a new IntegrationSimplex.
const double * frame(index_t i) const
Gets a frame by index.
~IntegrationSimplex() override
IntegrationSimplex destructor.
bool background_mesh_has_varying_attribute() const
Specifies whether the background mesh has varying attributes used in the computation.
An array of light-weight synchronisation primitives (spinlocks).
Base class of reference-counted objects, to be used with smart pointers.
Geometric functions in 2d and 3d.
Global Vorpaline namespace.
geo_index_t index_t
The type for storing and manipulating indices.
geo_coord_index_t coord_index_t
The type for storing coordinate indices, and iterating on the coordinates of a point.
Types and functions for numbers manipulation.
Pointers with automatic reference counting.