Extension: Json and NetCDF utilities
#include "dg/file/file.h"
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Modules

Parameter struct for probe values. More...

Public Member Functions

unsigned get_coords_sizes () const
 Check that coords all have same size and return that size.
 

Public Attributes

std::vector< dg::HVec > coords
 Coordinates list.
 
std::vector< std::string > coords_names
 Name of coordinates (must have same size as coords)
 
std::string format
 Optional format string for coords.
 
bool probes = false
 Indicate existence of probes.
 

Detailed Description

Parameter struct for probe values.

See also
dg::file::parse_probes and dg::file::Probes

Member Function Documentation

◆ get_coords_sizes()

unsigned dg::file::ProbesParams::get_coords_sizes ( ) const
inline

Check that coords all have same size and return that size.

Note
throws if sizes are not equal
Returns
size of coords

Member Data Documentation

◆ coords

std::vector< dg::HVec> dg::file::ProbesParams::coords

Coordinates list.

  • coords[0] (if present) is the list of x-coordinates
  • coords[1] (if present) is the list of y-coordinates
  • coords[2] (if present) is the list of z-coordinates

All lists must have same size. coords will be passed to dg::create::interpolation function in the dg::file::Probes class.

Note
In MPI all coordinates from all threads will be interpolated but only the coordinates that the master thread is holding will be written to file. Also note that parse_probes only reads coords on the master thread the other ranks remain empty

◆ coords_names

std::vector<std::string> dg::file::ProbesParams::coords_names

Name of coordinates (must have same size as coords)

◆ format

std::string dg::file::ProbesParams::format

Optional format string for coords.

The Probes class will write this as a group attribute

◆ probes

bool dg::file::ProbesParams::probes = false

Indicate existence of probes.

If false then no probes exist. The dg::file::Probes class will write no probes in that case and all its member functions return immediately.

The dg::file::parse_probes will set this flag if "probes" field does not exist in input file.

Note
All MPI processes must agree on the value of probes

The documentation for this struct was generated from the following file: