Program Listing for File SourceHandler.h¶
↰ Return to documentation for file (include/file_manager/SourceHandler.h)
// _______. ______ __ ___ .__ __. .___________. __ ___ ___ //
// / | / || | / \ | \ | | | || | \ \ / / //
// | (----`| ,----'| | / ^ \ | \| | `---| |----`| | \ V / //
// \ \ | | | | / /_\ \ | . ` | | | | | > < //
// .----) | | `----.| | / _____ \ | |\ | | | | | / . \ //
// |_______/ \______||__| /__/ \__\ |__| \__| |__| |__| /__/ \__\ //
// //
// Originally developed by D. Pizzocri & T. Barani //
// //
// Version: 2.1 //
// Year: 2024 //
// Authors: D. Pizzocri, G. Zullo. //
// //
#ifndef SOURCEHANDLER_H
#define SOURCEHANDLER_H
#include "Source.h"
#include <vector>
void loadSourcesFromFile(const std::string& filePath, std::vector<Source>& sources);
void loadICFromFile(const std::string& filePath, std::vector<Source>& ics, bool& fileFound);
std::vector<Source> sourceInterpolation(const std::vector<Source>& sources, int interpolation_size);
void printSources(const std::vector<Source>& sources);
void printSource(const Source& source);
void writeToFile(const std::vector<Source>& interpolatedSources, double GrainRadius);
void computeAndSaveSourcesToFile(const std::vector<Source>& sources,
const std::string& outputFilePath,
double step,
double GrainRadius);
void computeAndSaveICToFile(const std::vector<Source>& ics,
const std::string& outputFilePath,
double step,
double GrainRadius);
double Source_Volume_Average(double GrainRadius, Source source);
std::vector<Source> subtractResolutionFromSource(const std::vector<Source>& fullSource);
#endif // SOURCEHANDLER_H