Class MLSPointCloudInterpolation
Defined in File interpolation_base.h
Inheritance Relationships
Base Type
public pcms::InterpolationBase(Class InterpolationBase)
Class Documentation
-
class MLSPointCloudInterpolation : public pcms::InterpolationBase
Meshless Point-Cloud Based Moving Least Square (MLS) Interpolation.
If two point clouds are provided, mesh based accelerated adjacency search cannot be used. Instead, each target points search the whole source point cloud for neighbors within a given radius.
Public Functions
-
template<typename SourceType, typename TargetType>
inline MLSPointCloudInterpolation(pcms::Rank1View<SourceType, pcms::HostMemorySpace> source_points, pcms::Rank1View<TargetType, pcms::HostMemorySpace> target_points, int dim, double radius, unsigned min_req_supports = 10, unsigned degree = 3, bool adapt_radius = true, double lambda = 0.0, double decay_factor = 5.0) Constructor for point-cloud based MLS interpolation.
For more details about MLS interpolation parameters, refer to the documentation of mls_interpolation and RadialBasisFunction.
Source and target point coordinates are expected to be in a flattened array format. For example, for 3D points, the coordinates should be provided as [x1, y1, z1, x2, y2, z2, …, xn, yn, zn] with n being the number of points.
It constructors the support structure by performing \((N_{targets} \times N_{sources})\) searches.
See also
- Template Parameters:
SourceType – Source-point data type: any type convertible to const double
TargetType – Target-point data type: any type convertible to const double
- Parameters:
source_points – The source point coordinates
target_points – The target point coordinates
dim – The spatial dimension of the points
radius – The cutoff radius for the MLS interpolation
min_req_supports – The minimum number of source locations required for interpolation
degree – The degree of the polynomial used in the MLS interpolation
adapt_radius – Whether to adapt the radius to satisfy the minimum and maximum number of supports (maximum is set to 3 times the minimum)
lambda – Regularization parameter for the MLS interpolation
decay_factor – Decay factor for the weight function in the MLS interpolation
-
virtual void eval(pcms::Rank1View<double, pcms::HostMemorySpace> source_field, pcms::Rank1View<double, pcms::HostMemorySpace> target_field) override
Evaluate the interpolation.
Note
User is responsible for ensuring that the source and target fields are sustained during the evaluation. The size of the source and target fields must match the sizes returned by getSourceSize() and getTargetSize() respectively.
- Parameters:
source_field – The field to interpolate from
target_field – The field to interpolate to
-
inline SupportResults getSupports()
-
inline virtual size_t getSourceSize() const override
Get the size of the source field.
- Returns:
size_t The size of the source field
-
inline virtual size_t getTargetSize() const override
Get the size of the target field.
- Returns:
size_t The size of the target field
-
template<typename SourceType, typename TargetType>