PPCKO: Principal Predictive Components for Estimating an Autoregressive Operator
Loading...
Searching...
No Matches
meshGenerators.hpp
Go to the documentation of this file.
1
// Copyright (c) 2024 Andrea Enrico Franzoni (andreaenrico.franzoni@gmail.com)
2
//
3
// This file is part of PPCKO
4
//
5
// Permission is hereby granted, free of charge, to any person obtaining a copy
6
// of PPCKO and associated documentation files (the PPCKO software), to deal
7
// PPCKO without restriction, including without limitation the rights
8
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
// copies of PPCKO, and to permit persons to whom PPCKO is
10
// furnished to do so, subject to the following conditions:
11
//
12
// PPCKO IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17
// OUT OF OR IN CONNECTION WITH PPCKO OR THE USE OR OTHER DEALINGS IN
18
// PPCKO.
19
20
#ifndef HH_GENERATOR_HH
21
#define HH_GENERATOR_HH
22
#include "
domain.hpp
"
23
#include <functional>
24
#include <stdexcept>
25
#include <vector>
26
27
34
35
namespace
Geometry
36
{
37
using
MeshNodes = std::vector<double>;
39
class
OneDMeshGenerator
40
{
41
public
:
42
OneDMeshGenerator(
Geometry::Domain1D
const
&d) : M_domain{d} {}
43
virtual
MeshNodes operator()()
const
= 0;
44
Domain1D
45
getDomain()
const
46
{
47
return
M_domain;
48
}
49
virtual
~OneDMeshGenerator() =
default
;
50
51
protected
:
52
Geometry::Domain1D
M_domain;
53
};
54
57
class
Uniform
:
public
OneDMeshGenerator
58
{
59
public
:
64
Uniform
(
Geometry::Domain1D
const
&domain,
unsigned
int
num_elements)
65
: OneDMeshGenerator(domain), M_num_elements(num_elements)
66
{}
67
68
71
MeshNodes
operator()
()
const override
;
72
73
private
:
74
std::size_t M_num_elements;
75
};
76
77
}
// namespace Geometry
78
#endif
Geometry::Domain1D
Definition
domain.hpp:37
Geometry::Uniform::Uniform
Uniform(Geometry::Domain1D const &domain, unsigned int num_elements)
Definition
meshGenerators.hpp:64
Geometry::Uniform::operator()
MeshNodes operator()() const override
Call operator.
Definition
meshGenerators.cpp:34
domain.hpp
Contains the class for an unidimensioanl domain.
Geometry
Definition
domain.cpp:32
src
meshGenerators.hpp
Generated by
1.13.1