Skip to content

Commit

Permalink
Starting the implementation of Gauss Legendre quad
Browse files Browse the repository at this point in the history
  • Loading branch information
Goul-tard committed Dec 22, 2024
1 parent 43814f8 commit f037e3f
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/demeter/quadrature.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#pragma once

#include "solve/gauss_legendre.hpp"
16 changes: 16 additions & 0 deletions src/demeter/quadrature/gauss_legendre.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#include "gauss_legendre.hpp"

#include <cmath>
#include <iostream>
#include <Eigen/Dense>

namespace Demeter {

void GaussLegendre::compute_angles() {
// to do
}

void GaussLegendre::compute_weights() {
// to do
}
} // namespace Demeter
24 changes: 24 additions & 0 deletions src/demeter/quadrature/gauss_legendre.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#pragma once


#include <Eigen/Core>
#include <Eigen/Dense>

namespace Demeter {

class GaussLegendre {
public:

GaussLegendre(const int& nphi, const int& nteta)
: nphi_(nphi), nteta_(nteta) {
}

void compute_angles();
void compute_weights();

private:
int nphi_; // nber of azimutal angles
int nteta_; // nber of polar angles

};
} // namespace Demeter
1 change: 0 additions & 1 deletion src/demeter/solve/linear_solver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ namespace Demeter {
class LinearSolver {
public:

// Constructeur vide
LinearSolver(const Eigen::Matrix2f& A, const Eigen::Matrix2f& b)
: A_(A), b_(b) {
// Initialisation par défaut
Expand Down

0 comments on commit f037e3f

Please sign in to comment.