Chombo + EB
3.0
src
AMRTools
NodeMGInterp.H
Go to the documentation of this file.
1
#ifdef CH_LANG_CC
2
/*
3
* _______ __
4
* / ___/ / ___ __ _ / / ___
5
* / /__/ _ \/ _ \/ V \/ _ \/ _ \
6
* \___/_//_/\___/_/_/_/_.__/\___/
7
* Please refer to Copyright.txt, in Chombo's root directory.
8
*/
9
#endif
10
11
// NodeMGInterp.H
12
// petermc, 20 Jun 2001
13
#ifndef _NODEMGINTERP_H_
14
#define _NODEMGINTERP_H_
15
16
#include "
REAL.H
"
17
#include "
LevelData.H
"
18
#include "
NodeFArrayBox.H
"
19
#include "NamespaceHeader.H"
20
21
/// Class to interpolate coarse-level data to a fine level
22
/**
23
NodeMGInterp manages the interpolation of coarse-level data
24
to fine-level data for multigrid.
25
This class should be considered internal
26
to AMRNodeSolver and not a part of the Chombo API.
27
*/
28
class
NodeMGInterp
29
{
30
public
:
31
32
/**
33
\name Constructors, destructor and defines
34
*/
35
/*@{*/
36
37
///
38
/** Default constructor. User must subsequently call define().
39
*/
40
NodeMGInterp
();
41
42
///
43
/** Destructor.
44
*/
45
~NodeMGInterp
();
46
47
///
48
/** Defining constructor. Calls define() function with
49
identical arguments.
50
*/
51
NodeMGInterp
(
const
DisjointBoxLayout
& a_grids,
52
int
a_numcomps,
53
int
a_refRatio,
54
const
Box
& a_domain);
55
56
///
57
/** Defining constructor. Calls define() function with
58
identical arguments.
59
*/
60
NodeMGInterp
(
const
DisjointBoxLayout
& a_grids,
61
int
a_numcomps,
62
int
a_refRatio,
63
const
ProblemDomain
& a_domain);
64
65
///
66
/** Defines this object. Existing information is overridden.
67
*/
68
void
define
(
/// CELL-centered grids at the finer level
69
const
DisjointBoxLayout
& a_grids,
70
/// number of components of data
71
int
a_numcomps,
72
/// refinement ratio between the two levels
73
int
a_refRatio,
74
/// CELL-centered physical domain at the finer level
75
const
ProblemDomain
& a_domain);
76
77
///
78
/** Defines this object. Existing information is overridden.
79
*/
80
void
define
(
/// CELL-centered grids at the finer level
81
const
DisjointBoxLayout
& a_grids,
82
/// number of components of data
83
int
a_numcomps,
84
/// refinement ratio between the two levels
85
int
a_refRatio,
86
/// CELL-centered physical domain at the finer level
87
const
Box
& a_domain);
88
89
/*@}*/
90
91
/**
92
\name Access functions
93
*/
94
/*@{*/
95
96
///
97
/** Returns <tt>true</tt> if this object was created with the defining
98
constructor or if define() has been called.
99
*/
100
bool
isDefined
()
const
;
101
102
/*@}*/
103
104
/**
105
\name Data modification functions
106
*/
107
/*@{*/
108
109
///
110
/** Adds interpolated coarse-level data to fine-level data.
111
*/
112
void
interpToFine
(
/// data at the finer level
113
LevelData<NodeFArrayBox>
& a_fine,
114
/// data at the coarser level
115
const
LevelData<NodeFArrayBox>
& a_coarse,
116
/// whether the finer-level grids are refinements of the coarser-level grids
117
bool
a_sameGrids =
false
);
118
119
/*@}*/
120
121
protected
:
122
123
/** has this NodeMGInterp object been defined yet?
124
*/
125
bool
is_defined
;
126
127
/** the refinement ratio between the two levels
128
*/
129
int
m_refRatio
;
130
131
/** work array for the coarse-level data in a domain that is the
132
outline of the fine level domain on the coarse level
133
*/
134
BoxLayoutData<NodeFArrayBox>
m_coarsenedFine
;
135
136
/** CELL-centered grids at the finer level
137
*/
138
DisjointBoxLayout
m_grids
;
139
140
/** CELL-centered physical domain at the finer level
141
*/
142
ProblemDomain
m_domain
;
143
144
/** reference box used in interpolation
145
*/
146
Box
m_boxRef
;
147
148
/** weights of corners in interpolation
149
*/
150
FArrayBox
m_weights
;
151
};
152
153
#include "NamespaceFooter.H"
154
#endif
ProblemDomain
A class to facilitate interaction with physical boundary conditions.
Definition:
ProblemDomain.H:130
NodeMGInterp::m_domain
ProblemDomain m_domain
Definition:
NodeMGInterp.H:142
NodeMGInterp::m_weights
FArrayBox m_weights
Definition:
NodeMGInterp.H:150
NodeMGInterp::~NodeMGInterp
~NodeMGInterp()
NodeMGInterp
Class to interpolate coarse-level data to a fine level.
Definition:
NodeMGInterp.H:28
LevelData< NodeFArrayBox >
BoxLayoutData< NodeFArrayBox >
DisjointBoxLayout
A BoxLayout that has a concept of disjointedness.
Definition:
DisjointBoxLayout.H:31
NodeMGInterp::NodeMGInterp
NodeMGInterp()
Box
A Rectangular Domain on an Integer Lattice.
Definition:
Box.H:465
NodeFArrayBox.H
NodeMGInterp::m_coarsenedFine
BoxLayoutData< NodeFArrayBox > m_coarsenedFine
Definition:
NodeMGInterp.H:134
NodeMGInterp::m_refRatio
int m_refRatio
Definition:
NodeMGInterp.H:129
FArrayBox
Definition:
FArrayBox.H:44
NodeMGInterp::m_boxRef
Box m_boxRef
Definition:
NodeMGInterp.H:146
NodeMGInterp::is_defined
bool is_defined
Definition:
NodeMGInterp.H:125
REAL.H
NodeMGInterp::isDefined
bool isDefined() const
NodeMGInterp::m_grids
DisjointBoxLayout m_grids
Definition:
NodeMGInterp.H:138
LevelData.H
NodeMGInterp::define
void define(const DisjointBoxLayout &a_grids, int a_numcomps, int a_refRatio, const ProblemDomain &a_domain)
NodeMGInterp::interpToFine
void interpToFine(LevelData< NodeFArrayBox > &a_fine, const LevelData< NodeFArrayBox > &a_coarse, bool a_sameGrids=false)
Generated by
1.8.13