Cabana 0.8.0-dev
 
Loading...
Searching...
No Matches
Cabana_Grid_BovWriter.hpp File Reference

Brick of values (BOV) grid output. More...

#include <Cabana_Grid_Array.hpp>
#include <Cabana_Grid_Halo.hpp>
#include <Cabana_Grid_IndexSpace.hpp>
#include <Cabana_Grid_MpiTraits.hpp>
#include <Cabana_Grid_Types.hpp>
#include <Kokkos_Core.hpp>
#include <mpi.h>
#include <array>
#include <fstream>
#include <iomanip>
#include <sstream>
#include <string>
#include <type_traits>
Include dependency graph for Cabana_Grid_BovWriter.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Cabana::Grid::Experimental::BovWriter::BovFormat< short >
 BOV Format traits. More...
 
struct  Cabana::Grid::Experimental::BovWriter::BovFormat< int >
 BOV Format traits. More...
 
struct  Cabana::Grid::Experimental::BovWriter::BovFormat< float >
 BOV Format traits. More...
 
struct  Cabana::Grid::Experimental::BovWriter::BovFormat< double >
 BOV Format traits. More...
 
struct  Cabana::Grid::Experimental::BovWriter::BovCentering< Cell >
 BOV Centering. More...
 
struct  Cabana::Grid::Experimental::BovWriter::BovCentering< Node >
 BOV Centering. More...
 

Namespaces

namespace  Cabana
 Core: particle data structures and algorithms.
 

Functions

template<class Array_t, std::size_t N>
MPI_Datatype Cabana::Grid::Experimental::BovWriter::createSubarray (const Array_t &array, const std::array< long, N > &owned_extents, const std::array< long, N > &global_extents)
 Create the MPI subarray for the given array.
 
template<class TargetView, class SourceView, class Indices, class ExecSpace>
std::enable_if_t< 4==TargetView::rank, void > Cabana::Grid::Experimental::BovWriter::reorderView (TargetView &target, const SourceView &source, const Indices &index_space, const ExecSpace &exec_space)
 Reorder a view to the required ordering for I/O.
 
template<class TargetView, class SourceView, class Indices, class ExecSpace>
std::enable_if_t< 3==TargetView::rank, void > Cabana::Grid::Experimental::BovWriter::reorderView (TargetView &target, const SourceView &source, const Indices &index_space, const ExecSpace &exec_space)
 Reorder a view to the required ordering for I/O.
 
template<class ExecutionSpace, class Array_t>
void Cabana::Grid::Experimental::BovWriter::writeTimeStep (ExecutionSpace, const std::string &prefix, const int time_step_index, const double time, const Array_t &array, const bool gather_array=true)
 Write a grid array to a VisIt BOV.
 
template<class Array_t>
void Cabana::Grid::Experimental::BovWriter::writeTimeStep (const std::string &prefix, const int time_step_index, const double time, const Array_t &array, const bool gather_array=true)
 Write a grid array to a VisIt BOV.
 
template<class ExecutionSpace, class Array_t, typename std::enable_if< Kokkos::is_execution_space< ExecutionSpace >::value, int >::type = 0>
void Cabana::Grid::Experimental::BovWriter::writeTimeStep (ExecutionSpace, const int time_step_index, const double time, const Array_t &array, const bool gather_array=true)
 Write a grid array to a VisIt BOV.
 
template<class Array_t>
void Cabana::Grid::Experimental::BovWriter::writeTimeStep (const int time_step_index, const double time, const Array_t &array, const bool gather_array=true)
 Write a grid array to a VisIt BOV.
 

Detailed Description

Brick of values (BOV) grid output.

Function Documentation

◆ writeTimeStep() [1/4]

template<class Array_t>
void Cabana::Grid::Experimental::BovWriter::writeTimeStep ( const int time_step_index,
const double time,
const Array_t & array,
const bool gather_array = true )

Write a grid array to a VisIt BOV.

This version writes a single output and does not use bricklets. We will do this in the future to improve parallel visualization.

Parameters
time_step_indexThe index of the time step we are writing.
timeThe current time
arrayThe array to write
gather_arrayGather the array before writing to make parallel consistent.

◆ writeTimeStep() [2/4]

template<class Array_t>
void Cabana::Grid::Experimental::BovWriter::writeTimeStep ( const std::string & prefix,
const int time_step_index,
const double time,
const Array_t & array,
const bool gather_array = true )

Write a grid array to a VisIt BOV.

This version writes a single output and does not use bricklets. We will do this in the future to improve parallel visualization.

Parameters
prefixThe filename prefix
time_step_indexThe index of the time step we are writing.
timeThe current time
arrayThe array to write
gather_arrayGather the array before writing to make parallel consistent.

◆ writeTimeStep() [3/4]

template<class ExecutionSpace, class Array_t, typename std::enable_if< Kokkos::is_execution_space< ExecutionSpace >::value, int >::type = 0>
void Cabana::Grid::Experimental::BovWriter::writeTimeStep ( ExecutionSpace ,
const int time_step_index,
const double time,
const Array_t & array,
const bool gather_array = true )

Write a grid array to a VisIt BOV.

This version writes a single output and does not use bricklets. We will do this in the future to improve parallel visualization.

Parameters
time_step_indexThe index of the time step we are writing.
timeThe current time
arrayThe array to write
gather_arrayGather the array before writing to make parallel consistent.

◆ writeTimeStep() [4/4]

template<class ExecutionSpace, class Array_t>
void Cabana::Grid::Experimental::BovWriter::writeTimeStep ( ExecutionSpace ,
const std::string & prefix,
const int time_step_index,
const double time,
const Array_t & array,
const bool gather_array = true )

Write a grid array to a VisIt BOV.

This version writes a single output and does not use bricklets. We will do this in the future to improve parallel visualization.

Parameters
prefixThe filename prefix
time_step_indexThe index of the time step we are writing.
timeThe current time
arrayThe array to write
gather_arrayGather the array before writing to make parallel consistent.