14#include "gtest/gtest.h"
21TEST(deltaRomaEtAlTest, zeroOutside)
23 const PetscReal h = 1.0;
29TEST(deltaRomaEtAlTest, maximumValue)
31 const PetscReal h = 1.0;
36TEST(deltaRomaEtAlTest, decreasingInfluence)
38 const PetscReal h = 1.0;
40 std::vector<PetscReal> vals(10);
41 std::default_random_engine engine;
42 std::uniform_real_distribution<PetscReal> distrib(0.0, 1.5);
43 std::generate(vals.begin(), vals.end(), [&]() { return distrib(engine); });
44 std::sort(vals.begin(), vals.end());
46 for (
unsigned int i = 0; i < vals.size() - 1; i++)
51int main(
int argc,
char **argv)
53 PetscErrorCode ierr, status;
55 ::testing::InitGoogleTest(&argc, argv);
56 ierr = PetscInitialize(&argc, &argv,
nullptr,
nullptr); CHKERRQ(ierr);
57 status = RUN_ALL_TESTS();
58 ierr = PetscFinalize(); CHKERRQ(ierr);
Prototype of Delta functions.
TEST(deltaRomaEtAlTest, zeroOutside)
int main(int argc, char **argv)
PetscReal Roma_et_al_1999(const PetscReal &r, const PetscReal &dr)
Regularized delta function from Roma et al. (1999).
A namespace of all kinds of discretized delta functions.