Mallard 0.8.0
Unstructured, GPU accelerated, high-order finite volume CFD solver
Mallard website
Loading...
Searching...
No Matches
statistics.h File Reference

In-situ running time averages and probes. More...

#include <array>
#include <cstdint>
#include <fstream>
#include <memory>
#include <string>
#include <utility>
#include <vector>
#include <Kokkos_Core.hpp>
#include <toml.hpp>
#include "common_typedef.h"
#include "data.h"
#include "data_writer.h"
#include "mesh.h"
#include "state.h"

Go to the source code of this file.

Classes

struct  CellSampler
 Cell values that statistics and probes sample, by code: 0 is RHO, 1 + i the primitive PRIMITIVE_NAMES[i], 1 + N_PRIMITIVE + k the mass fraction Y_k of species k. The primitives must be current. More...
 
class  Statistics
 Running time averages per owned cell: means of fields and covariances <a'b'> of pairs of them, updated on the device every interval steps once t > t_start. A sample at time t has weight t - t_prev (the previous sample's time, or t_start), and with a = w / W over the total weight W the update is (West 1979) d_a = a_new - mean_a, mean_a += a d_a, cov_ab += a (d_a (b_new - mean_b,new) - cov_ab), so each output field is the current average itself. Restart files carry the averages and the weights, so a restarted run continues them bitwise. More...
 
class  Probes
 Point and line probes: the values of the cells holding a set of points, written every interval steps by rank 0 as rows step,t,point,x,y(,z),variables... Each point takes the cell average of the cell containing it (the lowest global id on a shared face), or of the nearest cell centroid if no cell contains it. More...
 

Functions

std::vector< int32_t > locate_points (const Mesh &mesh, const std::vector< std::array< double, N_DIM > > &points)
 Owned cell of each point on this rank, or -1 where another rank (or none) holds it: the cell containing the point, the lowest global id among several, else the nearest cell centroid over all ranks.
 

Detailed Description

In-situ running time averages and probes.

Author
Matthew Bonanni (mbona.nosp@m.nni0.nosp@m.01@gm.nosp@m.ail..nosp@m.com)
Version
0.1
Date
2026-10-04

Function Documentation

◆ locate_points()

std::vector< int32_t > locate_points ( const Mesh &  mesh,
const std::vector< std::array< double, N_DIM > > &  points 
)

Owned cell of each point on this rank, or -1 where another rank (or none) holds it: the cell containing the point, the lowest global id among several, else the nearest cell centroid over all ranks.