HArD::Core2D
Hybrid Arbitrary Degree::Core 2D - Library to implement 2D schemes with edge and cell polynomials as unknowns
Loading...
Searching...
No Matches
integralweight.hpp
Go to the documentation of this file.
1// Structure to provide weight functions for integrals: provides value, and polynomial degree (cell by cell)
2
3/*
4 *
5 * This library was developed around HHO methods, although some parts of it have a more
6 * general purpose. If you use this code or part of it in a scientific publication,
7 * please mention the following book as a reference for the underlying principles
8 * of HHO schemes:
9 *
10 * The Hybrid High-Order Method for Polytopal Meshes: Design, Analysis, and Applications.
11 * D. A. Di Pietro and J. Droniou. Modeling, Simulation and Applications, vol. 19.
12 * Springer International Publishing, 2020, xxxi + 525p. doi: 10.1007/978-3-030-37203-3.
13 * url: https://hal.archives-ouvertes.fr/hal-02151813.
14 *
15 */
16
17#ifndef INTEGRALWEIGHT_HPP
18#define INTEGRALWEIGHT_HPP
19
20#include <mesh.hpp>
21
22namespace HArDCore2D
23{
24
31
33 {
34 // Generic constructor
36 const std::function<double (const Cell & T, const Eigen::Vector2d & x)> _value,
37 std::function<size_t (const Cell & T)> _deg
38 )
39 : value(_value),
40 deg(_deg)
41 {
42 // Do nothing
43 }
44
45 // Easy constructor for constant weights
46 IntegralWeight(double val)
47 : IntegralWeight( [val](const Cell &T, const Eigen::Vector2d &x)->double {return val;}, [](const Cell &T)->size_t {return 0;} )
48 {
49 // Do nothing
50 }
51
52 std::function<double (const Cell & T, const Eigen::Vector2d & x)> value;
53 std::function<size_t (const Cell & T)> deg;
54 };
55
57
58} // end of namespace HArDCore2D
59
60#endif
std::function< double(const Cell &T, const Eigen::Vector2d &x)> value
Definition integralweight.hpp:52
IntegralWeight(double val)
Definition integralweight.hpp:46
std::function< size_t(const Cell &T)> deg
Definition integralweight.hpp:53
IntegralWeight(const std::function< double(const Cell &T, const Eigen::Vector2d &x)> _value, std::function< size_t(const Cell &T)> _deg)
Definition integralweight.hpp:35
if(strcmp(field, 'real')) % real valued entries T
Definition mmread.m:93
Definition PastixInterface.hpp:16
Definition ddr-klplate.hpp:27
Structure for weights (scalar, at the moment) in integral.
Definition integralweight.hpp:33