GridFire 0.0.1a General Purpose Nuclear Network

Loading...
Searching...
No Matches
partition_composite.h
Go to the documentation of this file.
1#pragma once
2
3#include "gridfire/partition/partition_abstract.h"
4#include "gridfire/partition/partition_types.h"
5
6#include "fourdst/logging/logging.h"
7
8#include <string>
9#include <unordered_map>
10#include <vector>
11
12#include <memory>
13
14
15 namespace gridfire::partition {
27 class CompositePartitionFunction final : public PartitionFunction {
28 public:
37 explicit CompositePartitionFunction(const std::vector<BasePartitionType>& partitionFunctions);
45 CompositePartitionFunction(const CompositePartitionFunction& other);
56 [[nodiscard]] double evaluate(int z, int a, double T9) const override;
67 [[nodiscard]] double evaluateDerivative(int z, int a, double T9) const override;
75 [[nodiscard]] bool supports(int z, int a) const override;
82 [[nodiscard]] std::string type() const override;
88 [[nodiscard]] std::unique_ptr<PartitionFunction> clone() const override {
89 return std::make_unique<CompositePartitionFunction>(*this);
90 }
91 private:
92 quill::Logger* m_logger = fourdst::logging::LogManager::getInstance().getLogger("log");
93 std::vector<std::unique_ptr<PartitionFunction>> m_partitionFunctions;
94 private:
102 std::unique_ptr<PartitionFunction> selectPartitionFunction(const BasePartitionType type) const;
103 };
104 }
gridfire::partition::CompositePartitionFunction::selectPartitionFunction
std::unique_ptr< PartitionFunction > selectPartitionFunction(const BasePartitionType type) const
Definition partition_composite.cpp:92
gridfire::partition::CompositePartitionFunction::type
std::string type() const override
Definition partition_composite.cpp:76
gridfire::partition::CompositePartitionFunction::clone
std::unique_ptr< PartitionFunction > clone() const override
Definition partition_composite.h:88
gridfire::partition::CompositePartitionFunction::m_partitionFunctions
std::vector< std::unique_ptr< PartitionFunction > > m_partitionFunctions
Set of partition functions to use in the composite partition function.
Definition partition_composite.h:93
gridfire::partition::CompositePartitionFunction::evaluate
double evaluate(int z, int a, double T9) const override
Definition partition_composite.cpp:27
gridfire::partition::CompositePartitionFunction::evaluateDerivative
double evaluateDerivative(int z, int a, double T9) const override
Definition partition_composite.cpp:48
gridfire::partition::CompositePartitionFunction::CompositePartitionFunction
CompositePartitionFunction(const std::vector< BasePartitionType > &partitionFunctions)
Definition partition_composite.cpp:11
gridfire::partition::CompositePartitionFunction::m_logger
quill::Logger * m_logger
Definition partition_composite.h:92
gridfire::partition::CompositePartitionFunction::supports
bool supports(int z, int a) const override
Definition partition_composite.cpp:66
gridfire::partition::PartitionFunction
Abstract interface for evaluating nuclear partition functions.
Definition partition_abstract.h:17
gridfire::partition
Definition partition_composite.h:15
gridfire::partition::BasePartitionType
BasePartitionType
Enumerates available partition function implementations.
Definition partition_types.h:15
partition_abstract.h
partition_types.h