<commit_before>/**
*	2-D Steady State Conduction without Heat Generation | main.cpp
*
*	@libs	[Nodes.a, NodesHelper.a]
*	@header	[Nodes.h, NodesHelper.h]
*
*	@author Samuel0Paul <<EMAIL>>
**/

#include <iostream>
#include <iomanip>
#include <cstdlib>
#include <cstdint>
#include <chrono>
#include <thread>
#include <atomic>

#include "header/Nodes.h"
#include "header/NodesHelper.h"

#include "test/test.cpp"

using std::cout;	using std::endl;
using std::clog;
using std::cin;
using std::make_pair;

using prec_t = long double;

int main(int argc, char const *argv[])
{
	cout << std::nounitbuf;
	cout << std::setprecision(4) << std::fixed << std::boolalpha;
	cout << "############################ HMT Assignment ##########################" << endl
		 << " 2-D Steady State Conduction with and withour Heat Generation" << endl << endl
		 << " Author: <NAME> [UR11ME145] <<EMAIL>>" << endl
		 << "######################################################################" << endl << endl;

	/*HMT::NodesHelper<prec_t> nodes;
	nodes.init();
	nodes.canUseThreads(false);
	nodes.calculate();
	cout << nodes;
	cout << "Time taken: " << nodes.getDuration<std::chrono::nanoseconds>().count() << "ns" << endl;*/

	test::NodesWithoutHeatSrc<prec_t> testNodesWOHSrcTE{12, 12,
		500.0f, 100.0f, 100.0f, 100.0f, 0.0000001f, true};
	testNodesWOHSrcTE.test();
	test::NodesWithoutHeatSrc<prec_t> testNodesWOHSrcWTE{12, 12,
		500.0f, 100.0f, 100.0f, 100.0f, 0.0000001f, false};
	testNodesWOHSrcWTE.test();

	std::vector<std::pair<std::pair<uint64_t, uint64_t>, prec_t>> heatSrcs = {
		make_pair(make_pair(2, 2), 300.0f),
		make_pair(make_pair(5, 5), -1000.0f)
	};
	test::NodesWithHeatSrc<prec_t> testNodesWHSrcTE{12, 12,
		500.0f, 100.0f, 100.0f, 100.0f, 0.0000001f, false,
		heatSrcs};
	testNodesWHSrcTE.test();
	
	return 0;
}<commit_msg>more testing<commit_after>/**
*	2-D Steady State Conduction without Heat Generation | main.cpp
*
*	@libs	[Nodes.a, NodesHelper.a]
*	@header	[Nodes.h, NodesHelper.h]
*
*	@author Samuel0Paul <<EMAIL>>
**/

#include <iostream>
#include <iomanip>
#include <cstdlib>
#include <cstdint>
#include <chrono>
#include <thread>
#include <atomic>

#include "header/Nodes.h"
#include "header/NodesHelper.h"

#include "test/test.cpp"

using std::cout;	using std::endl;
using std::clog;
using std::cin;
using std::make_pair;

using prec_t = long double;

int main(int argc, char const *argv[])
{
	cout << std::nounitbuf;
	cout << std::setprecision(4) << std::fixed << std::boolalpha;
	cout << "############################ HMT Assignment ##########################" << endl
		 << " 2-D Steady State Conduction with and withour Heat Generation" << endl << endl
		 << " Author: <NAME> [UR11ME145] <<EMAIL>>" << endl
		 << "######################################################################" << endl << endl;

	/*HMT::NodesHelper<prec_t> nodes;
	nodes.init();
	nodes.canUseThreads(false);
	nodes.calculate();
	cout << nodes;
	cout << "Time taken: " << nodes.getDuration<std::chrono::nanoseconds>().count() << "ns" << endl;*/

	test::NodesWithoutHeatSrc<prec_t> testNodesWOHSrcTE{12, 12,
		500.0f, 100.0f, 100.0f, 100.0f, 0.0000001f, true};
	testNodesWOHSrcTE.test();
	test::NodesWithoutHeatSrc<prec_t> testNodesWOHSrcWTE{12, 12,
		500.0f, 100.0f, 100.0f, 100.0f, 0.0000001f, false};
	testNodesWOHSrcWTE.test();

	std::vector<std::pair<std::pair<uint64_t, uint64_t>, prec_t>> heatSrcs = {
		make_pair(make_pair(2, 2), 300.0f),
		make_pair(make_pair(5, 5), -1000.0f)
	};
	test::NodesWithHeatSrc<prec_t> testNodesWHSrcTE{12, 12,
		500.0f, 100.0f, 100.0f, 100.0f, 0.0000001f, false,
		heatSrcs};
	testNodesWHSrcTE.test();
	test::NodesWithHeatSrc<prec_t> testNodesWHSrcWTE{12, 12,
		500.0f, 100.0f, 100.0f, 100.0f, 0.0000001f, true,
		heatSrcs};
	testNodesWHSrcWTE.test();
	
	return 0;
}
{'fraction_non_alphanumeric': 0.23554264589384738, 'fraction_numerical': 0.06601531555320835, 'mean_word_length': 5.633975481611208, 'pattern_counts': {'":': 0, '<': 120, '<?xml version=': 0, '>': 44, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4162547', 'n_tokens_mistral': 1693, 'n_tokens_neox': 1459, 'n_words': 296}