PRISM
 v0.0.0
Loading...
Searching...
No Matches
SpeciesSummaryWriterBase.h
1//* This file is a part of PRISM: Plasma Reaction Input SysteM,
2//* A library for parcing chemical reaction networks for plasma chemistry
3//* https://github.com/NCSU-ComPS-Group/prism
4//*
5//* Licensed under MIT, please see LICENSE for details
6//* https://opensource.org/license/mit
7//*
8//* Copyright 2024, North Carolina State University
9//* ALL RIGHTS RESERVED
10//*
11#pragma once
12
13#include <sstream>
14#include <string>
15#include <vector>
16#include <map>
17#include <memory>
18
19namespace prism
20{
21
22class Species;
23
24class Reaction;
25
27{
28
29public:
40 void clear()
41 {
42 _summary_str.str("");
43 _summary_str.clear();
44 }
45
46 /*
47 * Getter method for the summary string
48 */
49 std::ostringstream & summaryString() { return _summary_str; }
53 virtual void addMiscSummary(const std::vector<std::shared_ptr<Species>> & species) = 0;
57 virtual void addLumpedSummary(std::map<std::string, std::vector<std::string>> lumped_map) = 0;
61 virtual void addSpeciesSummary(const std::vector<std::shared_ptr<Species>> & species,
62 const std::vector<std::shared_ptr<Reaction>> & rate_based,
63 const std::vector<std::shared_ptr<Reaction>> & xsec_based) = 0;
64
65protected:
67 std::ostringstream _summary_str;
68};
69
70}
Stores all of the data needed to perform calculations with a specific reaction.
Definition Reaction.h:73
SpeciesSummaryWriterBase()
Helper method for writing species summary for the reaction mechanism several methods of this type get...
Definition SpeciesSummaryWriterBase.h:36
virtual void addSpeciesSummary(const std::vector< std::shared_ptr< Species > > &species, const std::vector< std::shared_ptr< Reaction > > &rate_based, const std::vector< std::shared_ptr< Reaction > > &xsec_based)=0
Method for summarizing the reactions that each species is involved in.
std::ostringstream _summary_str
the stream that is used to construct the summary
Definition SpeciesSummaryWriterBase.h:67
virtual void addLumpedSummary(std::map< std::string, std::vector< std::string > > lumped_map)=0
Method for summarizing which species have been lumped into which others.
virtual void addMiscSummary(const std::vector< std::shared_ptr< Species > > &species)=0
Method for adding any random summaries to the top of the summary file.
void clear()
clears the state of the writer to begin a new file
Definition SpeciesSummaryWriterBase.h:40
The species object which represents the products and reactants in the reaction.
Definition Species.h:47