PolyFEM
Loading...
Searching...
No Matches
KernelProblem.hpp
Go to the documentation of this file.
1#pragma once
2
4
5#include <Eigen/Dense>
6
7#include <vector>
8#include <string>
9
10namespace polyfem
11{
12 namespace problem
13 {
14
16 {
17 public:
18 KernelProblem(const std::string &name, const assembler::Assembler &assembler);
19
20 VectorNd eval_fun(const VectorNd &pt, const double t) const override;
21 AutodiffGradPt eval_fun(const AutodiffGradPt &pt, const double t) const override;
22 AutodiffHessianPt eval_fun(const AutodiffHessianPt &pt, const double t) const override
23 {
24 assert(false);
25 return AutodiffHessianPt(1);
26 }
27
28 void rhs(const assembler::Assembler &assembler, const Eigen::MatrixXd &pts, const double t, Eigen::MatrixXd &val) const override;
29
30 void set_parameters(const json &params) override;
31 bool is_scalar() const override;
32
33 private:
35 int n_kernels_ = 5;
36 double kernel_distance_ = 0.05;
37 Eigen::VectorXd kernel_weights_;
38 };
39 } // namespace problem
40} // namespace polyfem
double val
Definition Assembler.cpp:86
const std::string & name() const
Definition Problem.hpp:23
AutodiffHessianPt eval_fun(const AutodiffHessianPt &pt, const double t) const override
VectorNd eval_fun(const VectorNd &pt, const double t) const override
bool is_scalar() const override
void rhs(const assembler::Assembler &assembler, const Eigen::MatrixXd &pts, const double t, Eigen::MatrixXd &val) const override
const assembler::Assembler & assembler_
void set_parameters(const json &params) override
Eigen::Matrix< AutodiffScalarHessian, Eigen::Dynamic, 1, 0, 3, 1 > AutodiffHessianPt
Eigen::Matrix< double, Eigen::Dynamic, 1, 0, 3, 1 > VectorNd
Definition Types.hpp:11
nlohmann::json json
Definition Common.hpp:9
Eigen::Matrix< AutodiffScalarGrad, Eigen::Dynamic, 1, 0, 3, 1 > AutodiffGradPt