Chi-Tech
chi_ffinter_line.h
Go to the documentation of this file.
1
#ifndef CHI_FFINTER_LINE_H
2
#define CHI_FFINTER_LINE_H
3
4
#include "../chi_ffinterpolation.h"
5
#include "
mesh/chi_mesh.h
"
6
7
#include <petscksp.h>
8
9
namespace
chi_mesh
10
{
11
struct
FieldFunctionContext
12
{
13
std::shared_ptr<chi_physics::FieldFunctionGridBased>
ref_ff
;
14
std::vector<double>
interpolation_points_values
;
15
std::vector<uint64_t>
interpolation_points_ass_cell
;
16
std::vector<bool>
interpolation_points_has_ass_cell
;
17
};
18
}
19
20
namespace
chi_mesh
21
{
22
//###################################################################
23
/** A line based interpolation function.*/
24
class
FieldFunctionInterpolationLine
:
25
public
FieldFunctionInterpolation
26
{
27
protected
:
28
int
number_of_points_
= 2;
29
chi_mesh::Vector3
pi_
,
pf_
;
30
31
std::vector<std::vector<double>>
custom_arrays_
;
32
std::vector<chi_mesh::Vector3>
interpolation_points_
;
33
std::vector<FieldFunctionContext>
ff_contexts_
;
34
35
double
delta_d_
= 1.0;
36
37
public
:
38
FieldFunctionInterpolationLine
() :
39
FieldFunctionInterpolation
(ff_interpolation::
Type
::LINE)
40
{ }
41
42
int
&
GetNumberOfPoints
() {
return
number_of_points_
;}
43
chi_mesh::Vector3
&
GetInitialPoint
() {
return
pi_
;}
44
chi_mesh::Vector3
&
GetFinalPoint
() {
return
pf_
;}
45
std::vector<std::vector<double>>&
GetCustomArrays
() {
return
custom_arrays_
;}
46
std::vector<chi_mesh::Vector3>&
GetInterpolationPoints
()
47
{
return
interpolation_points_
;}
48
std::vector<FieldFunctionContext>&
GetFFContexts
()
49
{
return
ff_contexts_
;}
50
//01
51
void
Initialize
()
override
;
52
53
//02
54
void
Execute
()
override
;
55
56
public
:
57
std::string
GetDefaultFileBaseName
()
const override
58
{
return
"ZLFFI"
;}
59
void
ExportPython
(std::string base_name)
override
;
60
};
61
}
//namespace chi_mesh
62
63
64
65
#endif
chi_mesh.h
chi_mesh::FieldFunctionInterpolation
Definition:
chi_ffinterpolation.h:59
chi_mesh::FieldFunctionInterpolation::Type
ff_interpolation::Type Type() const
Definition:
chi_ffinterpolation.h:73
chi_mesh::FieldFunctionInterpolationLine
Definition:
chi_ffinter_line.h:26
chi_mesh::FieldFunctionInterpolationLine::GetFFContexts
std::vector< FieldFunctionContext > & GetFFContexts()
Definition:
chi_ffinter_line.h:48
chi_mesh::FieldFunctionInterpolationLine::GetInitialPoint
chi_mesh::Vector3 & GetInitialPoint()
Definition:
chi_ffinter_line.h:43
chi_mesh::FieldFunctionInterpolationLine::ExportPython
void ExportPython(std::string base_name) override
Definition:
chi_ffinter_line_exportpython.cc:14
chi_mesh::FieldFunctionInterpolationLine::GetNumberOfPoints
int & GetNumberOfPoints()
Definition:
chi_ffinter_line.h:42
chi_mesh::FieldFunctionInterpolationLine::GetDefaultFileBaseName
std::string GetDefaultFileBaseName() const override
Definition:
chi_ffinter_line.h:57
chi_mesh::FieldFunctionInterpolationLine::delta_d_
double delta_d_
Definition:
chi_ffinter_line.h:35
chi_mesh::FieldFunctionInterpolationLine::Execute
void Execute() override
Definition:
chi_ffinter_line_execute.cc:14
chi_mesh::FieldFunctionInterpolationLine::interpolation_points_
std::vector< chi_mesh::Vector3 > interpolation_points_
Definition:
chi_ffinter_line.h:32
chi_mesh::FieldFunctionInterpolationLine::GetCustomArrays
std::vector< std::vector< double > > & GetCustomArrays()
Definition:
chi_ffinter_line.h:45
chi_mesh::FieldFunctionInterpolationLine::custom_arrays_
std::vector< std::vector< double > > custom_arrays_
Definition:
chi_ffinter_line.h:31
chi_mesh::FieldFunctionInterpolationLine::pi_
chi_mesh::Vector3 pi_
Definition:
chi_ffinter_line.h:29
chi_mesh::FieldFunctionInterpolationLine::GetFinalPoint
chi_mesh::Vector3 & GetFinalPoint()
Definition:
chi_ffinter_line.h:44
chi_mesh::FieldFunctionInterpolationLine::FieldFunctionInterpolationLine
FieldFunctionInterpolationLine()
Definition:
chi_ffinter_line.h:38
chi_mesh::FieldFunctionInterpolationLine::Initialize
void Initialize() override
Definition:
chi_ffinter_line_initialize.cc:16
chi_mesh::FieldFunctionInterpolationLine::GetInterpolationPoints
std::vector< chi_mesh::Vector3 > & GetInterpolationPoints()
Definition:
chi_ffinter_line.h:46
chi_mesh::FieldFunctionInterpolationLine::number_of_points_
int number_of_points_
Definition:
chi_ffinter_line.h:28
chi_mesh::FieldFunctionInterpolationLine::ff_contexts_
std::vector< FieldFunctionContext > ff_contexts_
Definition:
chi_ffinter_line.h:33
chi_mesh::FieldFunctionInterpolationLine::pf_
chi_mesh::Vector3 pf_
Definition:
chi_ffinter_line.h:29
chi_mesh
Definition:
chi_runtime.h:13
chi_mesh::FieldFunctionContext
Definition:
chi_ffinter_line.h:12
chi_mesh::FieldFunctionContext::interpolation_points_values
std::vector< double > interpolation_points_values
Definition:
chi_ffinter_line.h:14
chi_mesh::FieldFunctionContext::interpolation_points_ass_cell
std::vector< uint64_t > interpolation_points_ass_cell
Definition:
chi_ffinter_line.h:15
chi_mesh::FieldFunctionContext::interpolation_points_has_ass_cell
std::vector< bool > interpolation_points_has_ass_cell
Definition:
chi_ffinter_line.h:16
chi_mesh::FieldFunctionContext::ref_ff
std::shared_ptr< chi_physics::FieldFunctionGridBased > ref_ff
Definition:
chi_ffinter_line.h:13
chi_mesh::Vector3
Definition:
chi_meshvector.h:19
framework
mesh
FieldFunctionInterpolation
Line
chi_ffinter_line.h
Generated by
1.9.3