-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpi.hpp
67 lines (59 loc) · 2.45 KB
/
pi.hpp
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
//========================================================================================
// (C) (or copyright) 2020. Triad National Security, LLC. All rights reserved.
//
// This program was produced under U.S. Government contract 89233218CNA000001 for Los
// Alamos National Laboratory (LANL), which is operated by Triad National Security, LLC
// for the U.S. Department of Energy/National Nuclear Security Administration. All rights
// in the program are reserved by Triad National Security, LLC, and the U.S. Department
// of Energy/National Nuclear Security Administration. The Government is granted for
// itself and others acting on its behalf a nonexclusive, paid-up, irrevocable worldwide
// license in this material to reproduce, prepare derivative works, distribute copies to
// the public, perform publicly and display publicly, and to permit others to do so.
//========================================================================================
#ifndef EXAMPLE_CALCULATE_PI_PI_HPP_
#define EXAMPLE_CALCULATE_PI_PI_HPP_
#include <memory>
#include "driver/driver.hpp"
#include "globals.hpp"
#include "interface/state_descriptor.hpp"
#include "mesh/mesh.hpp"
#include "parthenon_manager.hpp"
#include "task_list/tasks.hpp"
using parthenon::AmrTag;
using parthenon::BlockTask;
using parthenon::BlockTaskFunc;
using parthenon::CellVariable;
using parthenon::Container;
using parthenon::Coordinates;
using parthenon::DerivedOwnership;
using parthenon::Driver;
using parthenon::DriverStatus;
using parthenon::Mesh;
using parthenon::MeshBlock;
using parthenon::Metadata;
using parthenon::Outputs;
using parthenon::ParameterInput;
using parthenon::Params;
using parthenon::Real;
using parthenon::StateDescriptor;
using parthenon::TaskID;
using parthenon::TaskList;
using parthenon::TaskListStatus;
using parthenon::TaskStatus;
using parthenon::DriverUtils::ConstructAndExecuteBlockTasks;
using parthenon::Globals::my_rank;
using parthenon::Globals::nranks;
class CalculatePi : public Driver {
public:
CalculatePi(ParameterInput *pin, Mesh *pm, Outputs *pout) : Driver(pin, pm, pout) {}
TaskList MakeTaskList(MeshBlock *pmb);
DriverStatus Execute();
};
// putting a "physics" package in a namespace
namespace PiCalculator {
void SetInOrOut(Container<Real> &rc);
AmrTag CheckRefinement(Container<Real> &rc);
std::shared_ptr<StateDescriptor> Initialize(ParameterInput *pin);
TaskStatus ComputeArea(MeshBlock *pmb);
} // namespace PiCalculator
#endif // EXAMPLE_CALCULATE_PI_PI_HPP_