quadgrid 0.1
simple cartesian quad grid with particles for c++/octave
quadgrid_t< distributed_vector > Class Template Reference

#include <quadgrid_cpp.h>

Classes

class  cell_iterator
 
class  cell_t
 
struct  grid_properties_t
 
class  neighbor_iterator
 

Public Types

using idx_t = int
 

Public Member Functions

void from_json (const nlohmann::json &j, grid_properties_t &q)
 
 quadgrid_t (MPI_Comm _comm=MPI_COMM_WORLD)
 Default constructor, set all pointers to nullptr. More...
 
 quadgrid_t (const nlohmann::json &j, MPI_Comm _comm=MPI_COMM_WORLD)
 Ctor that reads grid properties from a json object. More...
 
 quadgrid_t (const quadgrid_t &)=delete
 Delete copy constructor. More...
 
quadgrid_toperator= (const quadgrid_t &)=delete
 Delete assignment operator. More...
 
 ~quadgrid_t ()=default
 Destructor. More...
 
void set_sizes (idx_t numrows, idx_t numcols, double hx, double hy)
 
void vtk_export (const char *filename, const std::map< std::string, distributed_vector > &f) const
 
void octave_ascii_export (const char *filename, const std::map< std::string, distributed_vector > &f) const
 
cell_iterator begin_cell_sweep ()
 
const cell_iterator begin_cell_sweep () const
 
cell_iterator end_cell_sweep ()
 
const cell_iterator end_cell_sweep () const
 
idx_t num_owned_nodes ()
 
idx_t num_local_nodes () const
 
idx_t num_global_nodes () const
 
idx_t num_local_cells () const
 
idx_t num_global_cells () const
 
idx_t num_rows () const
 
idx_t num_cols () const
 
double hx () const
 
double hy () const
 
idx_t sub2gind (idx_t r, idx_t c) const
 
idx_t gind2row (idx_t idx) const
 
idx_t gind2col (idx_t idx) const
 

Public Attributes

MPI_Comm comm
 
int rank
 
int size
 

Private Attributes

cell_t current_cell
 
cell_t current_neighbor
 
grid_properties_t grid_properties
 

Member Typedef Documentation

◆ idx_t

template<class distributed_vector >
using quadgrid_t< distributed_vector >::idx_t = int

Constructor & Destructor Documentation

◆ quadgrid_t() [1/3]

template<class distributed_vector >
quadgrid_t< distributed_vector >::quadgrid_t ( MPI_Comm  _comm = MPI_COMM_WORLD)
inline

Default constructor, set all pointers to nullptr.

◆ quadgrid_t() [2/3]

template<class distributed_vector >
quadgrid_t< distributed_vector >::quadgrid_t ( const nlohmann::json &  j,
MPI_Comm  _comm = MPI_COMM_WORLD 
)
inline

Ctor that reads grid properties from a json object.

◆ quadgrid_t() [3/3]

template<class distributed_vector >
quadgrid_t< distributed_vector >::quadgrid_t ( const quadgrid_t< distributed_vector > &  )
delete

Delete copy constructor.

◆ ~quadgrid_t()

template<class distributed_vector >
quadgrid_t< distributed_vector >::~quadgrid_t ( )
default

Destructor.

Member Function Documentation

◆ begin_cell_sweep() [1/2]

template<class T >
quadgrid_t< T >::cell_iterator quadgrid_t< T >::begin_cell_sweep

◆ begin_cell_sweep() [2/2]

template<class T >
const quadgrid_t< T >::cell_iterator quadgrid_t< T >::begin_cell_sweep

◆ end_cell_sweep() [1/2]

template<class distributed_vector >
cell_iterator quadgrid_t< distributed_vector >::end_cell_sweep ( )
inline

◆ end_cell_sweep() [2/2]

template<class distributed_vector >
const cell_iterator quadgrid_t< distributed_vector >::end_cell_sweep ( ) const
inline

◆ from_json()

template<class distributed_vector >
void quadgrid_t< distributed_vector >::from_json ( const nlohmann::json &  j,
grid_properties_t q 
)
inline

◆ gind2col()

template<class distributed_vector >
idx_t quadgrid_t< distributed_vector >::gind2col ( idx_t  idx) const
inline

◆ gind2row()

template<class distributed_vector >
idx_t quadgrid_t< distributed_vector >::gind2row ( idx_t  idx) const
inline

◆ hx()

template<class distributed_vector >
double quadgrid_t< distributed_vector >::hx ( ) const
inline

◆ hy()

template<class distributed_vector >
double quadgrid_t< distributed_vector >::hy ( ) const
inline

◆ num_cols()

template<class distributed_vector >
idx_t quadgrid_t< distributed_vector >::num_cols ( ) const
inline

◆ num_global_cells()

template<class T >
quadgrid_t< T >::idx_t quadgrid_t< T >::num_global_cells

◆ num_global_nodes()

template<class T >
quadgrid_t< T >::idx_t quadgrid_t< T >::num_global_nodes

◆ num_local_cells()

template<class T >
quadgrid_t< T >::idx_t quadgrid_t< T >::num_local_cells

◆ num_local_nodes()

template<class T >
quadgrid_t< T >::idx_t quadgrid_t< T >::num_local_nodes

◆ num_owned_nodes()

template<class distributed_vector >
idx_t quadgrid_t< distributed_vector >::num_owned_nodes ( )
inline

◆ num_rows()

template<class distributed_vector >
idx_t quadgrid_t< distributed_vector >::num_rows ( ) const
inline

◆ octave_ascii_export()

template<class distributed_vector >
void quadgrid_t< T >::octave_ascii_export ( const char *  filename,
const std::map< std::string, distributed_vector > &  f 
) const

◆ operator=()

template<class distributed_vector >
quadgrid_t & quadgrid_t< distributed_vector >::operator= ( const quadgrid_t< distributed_vector > &  )
delete

Delete assignment operator.

◆ set_sizes()

template<class T >
void quadgrid_t< T >::set_sizes ( idx_t  numrows,
idx_t  numcols,
double  hx,
double  hy 
)

◆ sub2gind()

template<class distributed_vector >
idx_t quadgrid_t< distributed_vector >::sub2gind ( idx_t  r,
idx_t  c 
) const
inline

◆ vtk_export()

template<class distributed_vector >
void quadgrid_t< T >::vtk_export ( const char *  filename,
const std::map< std::string, distributed_vector > &  f 
) const

Member Data Documentation

◆ comm

template<class distributed_vector >
MPI_Comm quadgrid_t< distributed_vector >::comm

◆ current_cell

template<class distributed_vector >
cell_t quadgrid_t< distributed_vector >::current_cell
mutableprivate

◆ current_neighbor

template<class distributed_vector >
cell_t quadgrid_t< distributed_vector >::current_neighbor
mutableprivate

◆ grid_properties

template<class distributed_vector >
grid_properties_t quadgrid_t< distributed_vector >::grid_properties
private

◆ rank

template<class distributed_vector >
int quadgrid_t< distributed_vector >::rank

◆ size

template<class distributed_vector >
int quadgrid_t< distributed_vector >::size

The documentation for this class was generated from the following files: