40 #ifndef GEOGRAM_VORONOI_INTEGRATION_SIMPLEX
41 #define GEOGRAM_VORONOI_INTEGRATION_SIMPLEX
133 const double* points,
137 nb_points_ = nb_points;
138 points_stride_ =
index_t(dimension);
141 spinlocks_ = spinlocks;
174 return varying_background_;
215 return points_ + i * points_stride_;
226 return frames_ + i * nb_comp_per_frame_;
235 const double* points_;
239 const double* frames_;
241 bool varying_background_;
244 typedef SmartPointer<IntegrationSimplex>
245 IntegrationSimplex_var;
#define geo_debug_assert(x)
Verifies that a condition is met.
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 * frame(index_t i) const
Gets a frame by index.
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.
~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.
Common include file, providing basic definitions. Should be included before anything else by all head...
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.
Functions and classes for process manipulation.