FlexELA
Loading...
Searching...
No Matches
asciilog.h
1#ifndef ASCII_LOG_H
2#define ASCII_LOG_H
3
4#include "../svector/svector.h"
5#include "output.h"
6
7#include <cstdio>
8#include <limits>
9
10namespace output {
11
12class ASCIILog {
13 public:
14#ifdef ELA_USE_MPI
15 ASCIILog(MPI_Comm comm);
16#else
17 ASCIILog();
18#endif
19
20 void addCell(const svec::SVector& s, const double dV, const double f);
21
22 void finalize();
23
24 void write(const char* filename, const double& time);
25
26 private:
27#ifdef ELA_USE_MPI
28 const MPI_Comm comm;
29 int rank;
30#endif
31
32 // largest label
33 svec::Label maxLabel;
34
35 // largest value in any s
36 svec::Value maxValue;
37
38 // smallest (non-zero) value in any s
39 svec::Value minValue;
40
41 // max NNZ of any s
42 std::size_t maxNNZ;
43
44 // sum of all ELA volume
45 double volELA;
46
47 // sum of all VOF volume
48 double volVOF;
49};
50
51} // namespace output
52
53#endif
Definition asciilog.h:12
A container for sparse vectors.
Definition svector.h:25
For writing the volume tracking matrix (VTM) and volume vector (vv)
Definition asciilog.h:10
double Value
Definition types.h:21
unsigned int Label
Definition types.h:15