Loading...
Searching...
No Matches
partition_composite.h
Go to the documentation of this file.
#pragma once
#include "gridfire/partition/partition_abstract.h"
#include "gridfire/partition/partition_types.h"
#include "fourdst/logging/logging.h"
#include <string>
#include <unordered_map>
#include <vector>
#include <memory>
namespace gridfire::partition {
class CompositePartitionFunction final : public PartitionFunction {
public:
explicit CompositePartitionFunction(const std::vector<BasePartitionType>& partitionFunctions);
CompositePartitionFunction(const CompositePartitionFunction& other);
[[nodiscard]] double evaluate(int z, int a, double T9) const override;
[[nodiscard]] double evaluateDerivative(int z, int a, double T9) const override;
[[nodiscard]] bool supports(int z, int a) const override;
[[nodiscard]] std::string type() const override;
[[nodiscard]] std::unique_ptr<PartitionFunction> clone() const override {
return std::make_unique<CompositePartitionFunction>(*this);
}
private:
quill::Logger* m_logger = fourdst::logging::LogManager::getInstance().getLogger("log");
std::vector<std::unique_ptr<PartitionFunction>> m_partitionFunctions;
private:
std::unique_ptr<PartitionFunction> selectPartitionFunction(const BasePartitionType type) const;
};
}
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