00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef _PIECEWISE_LINEAR_FILL_PATCH_FACE_H_
00025 #define _PIECEWISE_LINEAR_FILL_PATCH_FACE_H_
00026
00027 #include <iostream>
00028 #include <fstream>
00029 #include "REAL.H"
00030 #include "Box.H"
00031 #include "FArrayBox.H"
00032 #include "FluxBox.H"
00033 #include "LevelData.H"
00034 #include "IntVectSet.H"
00035 #include "ProblemDomain.H"
00036
00038
00053 class PiecewiseLinearFillPatchFace
00054 {
00055 public:
00057
00060 PiecewiseLinearFillPatchFace();
00061
00063
00066 ~PiecewiseLinearFillPatchFace();
00067
00069
00080 PiecewiseLinearFillPatchFace(const DisjointBoxLayout& a_fine_domain,
00081 const DisjointBoxLayout& a_coarse_domain,
00082 int a_num_comps,
00083 const Box& a_crse_problem_domain,
00084 int a_ref_ratio,
00085 int a_interp_radius
00086 );
00087
00088
00090
00101 PiecewiseLinearFillPatchFace(const DisjointBoxLayout& a_fine_domain,
00102 const DisjointBoxLayout& a_coarse_domain,
00103 int a_num_comps,
00104 const ProblemDomain& a_crse_problem_domain,
00105 int a_ref_ratio,
00106 int a_interp_radius
00107 );
00108
00110
00126 void
00127 define(const DisjointBoxLayout& a_fine_domain,
00128 const DisjointBoxLayout& a_coarse_domain,
00129 int a_num_comps,
00130 const Box& a_crse_problem_domain,
00131 int a_ref_ratio,
00132 int a_interp_radius
00133 );
00134
00135
00137
00153 void
00154 define(const DisjointBoxLayout& a_fine_domain,
00155 const DisjointBoxLayout& a_coarse_domain,
00156 int a_num_comps,
00157 const ProblemDomain& a_crse_problem_domain,
00158 int a_ref_ratio,
00159 int a_interp_radius
00160 );
00161
00163
00170 bool
00171 isDefined() const;
00172
00174
00203 void
00204 fillInterp(LevelData<FluxBox>& a_fine_data,
00205 const LevelData<FluxBox>& a_old_coarse_data,
00206 const LevelData<FluxBox>& a_new_coarse_data,
00207 Real a_time_interp_coef,
00208 int a_src_comp,
00209 int a_dest_comp,
00210 int a_num_comp
00211 );
00212
00213
00214 void
00215 printIntVectSets() const;
00216
00217
00218 protected:
00219
00220
00221 void
00222 timeInterp(const LevelData<FluxBox>& a_old_coarse_data,
00223 const LevelData<FluxBox>& a_new_coarse_data,
00224 Real a_time_interp_coef,
00225 int a_src_comp,
00226 int a_dest_comp,
00227 int a_num_comp
00228 );
00229
00230
00231
00232 void
00233 fillConstantInterp(LevelData<FluxBox>& a_fine_data,
00234 int a_src_comp,
00235 int a_dest_comp,
00236 int a_num_comp
00237 )
00238 const;
00239
00240
00241
00242 void
00243 computeSlopes(int a_dir,
00244 int a_src_comp,
00245 int a_num_comp);
00246
00247
00248
00249
00250 void
00251 incrementLinearInterpTangential(LevelData<FluxBox>& a_fine_data,
00252 int a_dir,
00253 int a_src_comp,
00254 int a_dest_comp,
00255 int a_num_comp)
00256 const;
00257
00258
00259
00260 void
00261 incrementLinearInterpNormal(LevelData<FluxBox>& a_fine_data,
00262 int a_src_comp,
00263 int a_dest_comp,
00264 int a_num_comp)
00265 const;
00266
00267
00268
00269
00270 protected:
00271 bool m_is_defined;
00272
00273
00274 static const int s_stencil_radius;
00275
00276 int m_ref_ratio;
00277
00278 int m_interp_radius;
00279
00280 LevelData<FluxBox> m_coarsened_fine_data;
00281
00282 LevelData<FluxBox> m_slopes;
00283
00284 ProblemDomain m_crse_problem_domain;
00285
00286 LayoutData<IntVectSet> m_fine_interp[SpaceDim];
00287
00288
00289
00290
00291 LayoutData<IntVectSet> m_coarse_centered_interp[SpaceDim][SpaceDim];
00292 LayoutData<IntVectSet> m_coarse_lo_interp[SpaceDim][SpaceDim];
00293 LayoutData<IntVectSet> m_coarse_hi_interp[SpaceDim][SpaceDim];
00294 };
00295
00296 #endif
00297
00298
00299