<commit_before>#include "LinearEllipticPDE.hpp"

double f1(Point const & point) {
	return point.x() * point.x();
}

double f2(Point const & point) {
	return point.y() * point.y();
}

int main() {
	// laplace
	ConstTensor I(3, 0.);
	I(0, 0) = I(1, 1) = I(2, 2) = 1.;
	LinearEllipticPDE LaplacesEquation3D(I, 0., zeroFunc);
	std::cout << "div(D grad u) = f, D:" << '\n';
	LaplacesEquation3D.diffusionTensor().save(std::cout);
	std::cout << "f(0, 0, 0): " << LaplacesEquation3D.forceTerm(Point()) << std::endl;
	// my problem example
	Tensor D(2);
	//D.load(std::cin);
	D(0, 0) = f1;
	D(1, 1) = f2;
	D(0, 1) = zeroFunc;
	NonLinearEllipticPDE MyEqn2D(D, f1, zeroFunc);
	Point dummy(1., 2.);
	std::cout << "Coeff of u_{xx}, u_{yy} etc. at (1, 2):" << '\n';
	MyEqn2D.diffusionTensor(dummy).save(std::cout);
	std::cout << "gamma(1, 2): " << MyEqn2D.gamma(dummy) << '\n'
			  << "f(1, 2): " << MyEqn2D.forceTerm(dummy) << std::endl;
	return 0;
}<commit_msg>Add example of creating BC for Laplaces eqn<commit_after>﻿#include "LinearEllipticPDE.hpp"
#include "BC.hpp"

double g(Point const & point) { // u = g on Г
	return point.x() * point.y();
}

int main() {
	// Laplace's eqn on the plane
	ConstTensor I(2, 0.);
	I(0, 0) = I(1, 1) = 1.;
	LinearEllipticPDE LaplacesEquation2D(I, 0., zeroFunc);
	BC myBC(g); // simple Dirichlet problem
	std::cout << "u(2, 3) = " << myBC.dirichlet(Point(2., 3.)) << std::endl;
	return 0;
}
{'fraction_non_alphanumeric': 0.21852899575671852, 'fraction_numerical': 0.038896746817538894, 'mean_word_length': 4.07168458781362, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 3, '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': '6912981', 'n_tokens_mistral': 658, 'n_tokens_neox': 606, 'n_words': 145}