Program Listing for File layout.hpp
↰ Return to documentation for file (src/pcms/backends/point_cloud/layout.hpp)
#ifndef PCMS_BACKENDS_POINT_CLOUD_LAYOUT_HPP
#define PCMS_BACKENDS_POINT_CLOUD_LAYOUT_HPP
#include "pcms/field/field.hpp"
namespace pcms::detail
{
class PointCloudLayout : public FieldLayout
{
public:
PointCloudLayout(int dim, Kokkos::View<Real**> coords,
std::shared_ptr<const CoordinateSystem> coordinate_system);
int GetNumComponents() const override;
// nodes for standard lagrange FEM
LO GetNumDofHolder() const override;
GO GetNumGlobalDofHolder() const override;
Rank1View<const bool, HostMemorySpace> GetOwnedHost() const override;
GlobalIDView<HostMemorySpace> GetGidsHost() const override;
CoordinateView<DeviceMemorySpace> GetDOFHolderCoordinates() const override;
[[nodiscard]] bool IsDistributed() const override;
size_t GetNumEnts() const;
EntOffsetsArray GetEntOffsets() const override;
int GetDimension() const override;
Rank1View<const LO, HostMemorySpace>
GetDOFHolderClassificationDimensionsHost() const override;
Rank1View<const LO, HostMemorySpace> GetDOFHolderClassificationIdsHost()
const override;
std::array<int, 4> GetNodesPerDim() const;
Kokkos::View<const Real**, DeviceMemorySpace> GetCoordinates() const;
private:
int dim_;
int components_;
Kokkos::View<Real**> coords_;
Kokkos::View<bool*> owned_;
Kokkos::View<GO*> gids_;
Kokkos::View<bool*, HostMemorySpace> owned_host_;
Kokkos::View<GO*, HostMemorySpace> gids_host_;
Kokkos::View<LO*, DeviceMemorySpace> classification_dims_;
Kokkos::View<LO*, DeviceMemorySpace> classification_ids_;
Kokkos::View<LO*, HostMemorySpace> classification_dims_host_;
Kokkos::View<LO*, HostMemorySpace> classification_ids_host_;
};
} // namespace pcms::detail
#endif // PCMS_BACKENDS_POINT_CLOUD_LAYOUT_HPP