Multi Resolution Molecular Dynamics 0.4.0
Multi Resolution Molecular Dynamics
Loading...
Searching...
No Matches
DumpProfile.hpp
Go to the documentation of this file.
1// Copyright 2024 Sebastian Eibl
2// Copyright 2026 Julian Friedrich Hille
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8// https://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15
16#pragma once
17
18#include <fstream>
19
20#include "datatypes.hpp"
21
22namespace mrmd
23{
24namespace io
25{
30{
31public:
32 void open(const std::string& filename);
33
34 void close();
35
36 void dumpScalarView(const ScalarView::HostMirror& dataProfile,
37 const real_t& normalizationFactor = 1_r);
38
39private:
40 std::ofstream fileProfile_;
41};
42
43void dumpSingleProfile(const std::string& filename,
44 const ScalarView::HostMirror& grid,
45 const ScalarView::HostMirror& dataProfile,
46 const real_t& normalizationFactor = 1_r);
47} // namespace io
48} // namespace mrmd
Handles dumping profile data to a file.
Definition DumpProfile.hpp:30
void close()
Definition DumpProfile.cpp:24
void open(const std::string &filename)
Definition DumpProfile.cpp:22
void dumpScalarView(const ScalarView::HostMirror &dataProfile, const real_t &normalizationFactor=1_r)
Definition DumpProfile.cpp:26
Save and load simulation data.
void dumpSingleProfile(const std::string &filename, const ScalarView::HostMirror &grid, const ScalarView::HostMirror &dataProfile, const real_t &normalizationFactor)
Definition DumpProfile.cpp:37
Top-level namespace of MRMD.
double real_t
Definition datatypes.hpp:99