Program Listing for File empty.hpp

↰ Return to documentation for file (src/pcms/field/layout/empty.hpp)

#ifndef PCMS_FIELD_LAYOUT_EMPTY_HPP
#define PCMS_FIELD_LAYOUT_EMPTY_HPP

#include "pcms/field/field_layout.hpp"
#include <Kokkos_Core.hpp>

namespace pcms::field
{

class EmptyFieldLayout : public FieldLayout
{
public:
  explicit EmptyFieldLayout(std::shared_ptr<const CoordinateSystem> system,
                            int num_components = 1, std::string name = "");

  int GetNumComponents() const override;
  LO GetNumDofHolder() const override;
  GO GetNumGlobalDofHolder() const override;
  Rank1View<const bool, HostMemorySpace> GetOwnedHost() const override;
  GlobalIDView<HostMemorySpace> GetGidsHost() const override;
  bool IsDistributed() const override;
  EntOffsetsArray GetEntOffsets() const override;
  CoordinateView<DeviceMemorySpace> GetDOFHolderCoordinates() const override;
  int GetDimension() const override;
  Rank1View<const LO, HostMemorySpace>
  GetDOFHolderClassificationDimensionsHost() const override;
  Rank1View<const LO, HostMemorySpace> GetDOFHolderClassificationIdsHost()
    const override;

private:
  Kokkos::View<bool*, DeviceMemorySpace> owned_;
  Kokkos::View<GO*, DeviceMemorySpace> gids_;
  Kokkos::View<LO*, DeviceMemorySpace> class_dims_;
  Kokkos::View<LO*, DeviceMemorySpace> class_ids_;
  Kokkos::View<bool*, HostMemorySpace> owned_host_;
  Kokkos::View<GO*, HostMemorySpace> gids_host_;
  Kokkos::View<LO*, HostMemorySpace> classification_dims_host_;
  Kokkos::View<LO*, HostMemorySpace> classification_ids_host_;
  Kokkos::View<Real**, DeviceMemorySpace> coords_;
  int num_components_;
};

} // namespace pcms::field

#endif // PCMS_FIELD_LAYOUT_EMPTY_HPP