-
Notifications
You must be signed in to change notification settings - Fork 2
/
MaterialVolumeOutput.h
42 lines (27 loc) · 985 Bytes
/
MaterialVolumeOutput.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/************************************************************************
* Copyright © 2020 The Multiphysics Modeling and Computation (M2C) Lab
* <kevin.wgy@gmail.com> <kevinw3@vt.edu>
************************************************************************/
#ifndef _MATERIAL_VOLUME_OUTPUT_H_
#define _MATERIAL_VOLUME_OUTPUT_H_
#include <SpaceVariable.h>
class IoData;
/** This class is responsible for calculating and outputing the volume of each
* material subdomain.
*/
class MaterialVolumeOutput {
MPI_Comm &comm;
SpaceVariable3D& cell_volume;
int frequency;
double frequency_dt;
double last_snapshot_time;
FILE* file;
int numMaterials;
public:
MaterialVolumeOutput(MPI_Comm &comm_, IoData &iod, SpaceVariable3D& cell_volume_);
~MaterialVolumeOutput();
void WriteSolution(double time, double dt, int time_step, SpaceVariable3D& ID, bool force_write);
private:
void ComputeMaterialVolumes(SpaceVariable3D& ID, double* vol);
};
#endif