2#ifndef STORMM_MESH_FOUNDATION_H
3#define STORMM_MESH_FOUNDATION_H
6#include "Accelerator/gpu_details.h"
7#include "Accelerator/hybrid.h"
8#include "Accelerator/mesh_kernel_manager.h"
9#include "Constants/behavior.h"
10#include "Topology/atomgraph.h"
11#include "Trajectory/coordinateframe.h"
12#include "Trajectory/coordinate_series.h"
13#include "mesh_parameters.h"
14#include "mesh_rulers.h"
20using card::HybridTargetLevel;
21using card::MeshKlManager;
22using constants::PrecisionModel;
23using topology::AtomGraph;
24using trajectory::CoordinateFrame;
25using trajectory::CoordinateSeries;
32 MeshBasicsKit(
const int* ngbr_in,
const size_t* ngbr_bounds_in,
const uint* frozen_atoms_in);
57 const std::vector<std::string> &comments = {1,
"Generated by STORMM"});
60 const std::vector<std::string> &comments = {1,
"Generated by STORMM"});
64 const std::vector<std::string> &comments = {1,
"Generated by STORMM"});
68 const std::vector<std::string> &comments = {1,
"Generated by STORMM"});
83 template <
typename Tcoord>
98 const std::string&
getComment(
int comm_index)
const;
112# ifdef STORMM_USE_CUDA
114 MeshBasicsKit deviceViewToHostData(HybridTargetLevel tier = HybridTargetLevel::HOST)
const;
160 PrecisionModel prec = PrecisionModel::SINGLE,
161 HybridTargetLevel availability = HybridTargetLevel::HOST);
187 size_t ensemble_data_type;
205 std::vector<std::string> comments;
212 int validateAtomCounts()
const;
215 void testReadiness();
221#include "mesh_foundation.tpp"
An evolution of GpuBuffer in pmemd.cuda, the Composite array has elements that are accessible from ei...
Definition hybrid.h:202
Collect and dispense the launch parameters for various mesh-based kernels. The launches for these ker...
Definition mesh_kernel_manager.h:29
MeshFoundation(const CoordinateFrame *cf_in=nullptr, const AtomGraph *ag_in=nullptr, const std::vector< std::string > &comments={1, "Generated by STORMM"})
The constructor accepts a topology some form of coordinates. It is overloaded to accept various valid...
Definition mesh_foundation.cpp:18
const AtomGraph * getTopologyPointer() const
Get a const pointer to the topology responsible for creating the associated mesh.
Definition mesh_foundation.cpp:71
const std::string & getComment(int comm_index) const
Get a comment from the list in the mesh.
Definition mesh_foundation.cpp:96
const CoordinateFrame * getCoordinatePointer() const
Get a const pointer to the coordinates responsible for creating the associated mesh.
Definition mesh_foundation.cpp:76
std::vector< uint > getFrozenAtomMask() const
Get the frozen atom mask.
Definition mesh_foundation.cpp:86
int getReadyFrameCount() const
Get an indication of whether the object has enough information to direct the construction of a mesh.
Definition mesh_foundation.cpp:66
void setEnsemble(const CoordinateSeries< Tcoord > *cs_in)
Set the series of coordinates that the mesh shall use.
void clearComments()
Clear the list of comments in the mesh.
Definition mesh_foundation.cpp:187
void addComment(const std::string &verbiage)
Add a comment to the mesh.
Definition mesh_foundation.cpp:182
int getCommentCount() const
Get the number of comments appended to the mesh.
Definition mesh_foundation.cpp:91
void computeNeighborLists(const MeshParameters &mps, const MeshRulers &rlrs, const MeshKlManager &launcher=MeshKlManager(), PrecisionModel prec=PrecisionModel::SINGLE, HybridTargetLevel availability=HybridTargetLevel::HOST)
Compute neighbor lists for each mesh element, if appropriate for the mesh type.
Definition mesh_foundation.cpp:176
const CoordinateSeries< Tcoord > * getEnsemblePointer() const
Get a const reference to the array of structures (each stored as a CoordinateFrame) reponsible for cr...
MeshFoundation(const CoordinateFrame *cf_in=nullptr, const AtomGraph *ag_in=nullptr, const std::vector< std::string > &comments={1, "Generated by STORMM"})
The constructor accepts a topology some form of coordinates. It is overloaded to accept various valid...
Definition mesh_foundation.cpp:18
void setCoordinates(const CoordinateFrame *cf_in)
Set the coordinates that the mesh shall use.
Definition mesh_foundation.cpp:164
void setTopology(const AtomGraph *ag_in)
Set the topology that the mesh shall use. This will allocate and populate the Hybrid array pertaining...
Definition mesh_foundation.cpp:143
MeshBasicsKit data(HybridTargetLevel tier=HybridTargetLevel::HOST) const
Get the object's abstract.
Definition mesh_foundation.cpp:108
size_t getEnsembleTypeCode() const
Get the codified data type of the ensemble.
Definition mesh_foundation.cpp:81
Encode the critical dimensions of a regular, rectilinear mesh. The locations of mesh points as well a...
Definition mesh_parameters.h:121
A collection of coordinate vectors describing each axis of a mesh. If the mesh axes track Cartesian a...
Definition mesh_rulers.h:75
A struct to hold information relating to an Amber topology. This struct's member functions are limite...
Definition atomgraph.h:50
Store the coordinates and box information for a frame, only. This abridged struct can serve when the ...
Definition coordinateframe.h:111
Store the coordinates and box information for a series of frames, in one of several levels of precisi...
Definition coordinate_series.h:137
Abstract for the MeshFoundation object to encapsulate pointers to its data on the host or the device.
Definition mesh_foundation.h:29
MeshBasicsKit(const MeshBasicsKit &original)=default
As with most abstracts, the presence of const members implies that the copy and move assignment opera...
const int * ngbr
Concatenated lists of neighbor atoms.
Definition mesh_foundation.h:43
const uint * frozen_atoms
Definition mesh_foundation.h:45
MeshBasicsKit(const int *ngbr_in, const size_t *ngbr_bounds_in, const uint *frozen_atoms_in)
The constructor takes arguments for each of the handful of member variables.
Definition mesh_foundation.cpp:12
const size_t * ngbr_bounds
Bounds array for the neighbor lists in ngbr.
Definition mesh_foundation.h:44