You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
1.3 KiB
50 lines
1.3 KiB
1 year ago
|
#pragma once
|
||
|
#include "BgMesh/BgMesh.hpp"
|
||
|
#include "Implict/ImplictModel.hpp"
|
||
|
#include <algorithm>
|
||
|
#include <Eigen/Eigen>
|
||
|
#include <iostream>
|
||
|
|
||
|
namespace ImplictSIM {
|
||
|
|
||
|
enum class HeightDir { X = 0,
|
||
|
Y = 1,
|
||
|
Z = 2 };
|
||
|
typedef std::pair<double, double> Interval;
|
||
|
|
||
|
template <size_t dim>
|
||
|
class VolumeIntegral {
|
||
|
public:
|
||
|
typedef double (*integrandFunc)(const Eigen::Vector<double, dim>& point);
|
||
|
int dimension;
|
||
|
std::vector<ImplictModel<dim>> phiFuncs;
|
||
|
std::vector<int> si;
|
||
|
BgMesh<dim> meshU;
|
||
|
integrandFunc f;
|
||
|
bool flagS;
|
||
|
int GaussOrderQ;
|
||
|
|
||
|
public:
|
||
|
VolumeIntegral(int dimension_, std::vector<ImplictModel<dim>>& phiFuncs_, const std::vector<int>& si_, const BgMesh<dim>& meshU_,
|
||
|
const integrandFunc f_, bool flagS_, int GaussOrderQ_)
|
||
|
: dimension(dimension_)
|
||
|
, phiFuncs(phiFuncs_)
|
||
|
, si(si_)
|
||
|
, meshU(meshU_)
|
||
|
, f(f_)
|
||
|
, flagS(flagS_)
|
||
|
, GaussOrderQ(GaussOrderQ_)
|
||
|
{
|
||
|
}
|
||
|
|
||
|
void findRoots(ImplictModel<dim> phiFunc,int si, HeightDir k,
|
||
|
Interval interval, Eigen::Vector<double, dim > x, std::vector<double> roots,double eps);
|
||
|
|
||
|
void getOneIntegrationOnInterval(ImplictModel<dim> phiFunc, int si,
|
||
|
HeightDir k, Interval interval, Eigen::Vector<double, dim> x, std::vector<double>& hDirPoints);
|
||
|
|
||
|
void getIntegration();
|
||
|
};
|
||
|
|
||
|
}; // namespace ImplictSIM
|