📄 meshrefine.h
字号:
// This software is copyright (C) by the Lawrence Berkeley
// National Laboratory. Permission is granted to reproduce
// this software for non-commercial purposes provided that
// this notice is left intact.
//
// It is acknowledged that the U.S. Government has rights to
// this software under Contract DE-AC03-765F00098 between
// the U.S. Department of Energy and the University of
// California.
//
// This software is provided as a professional and academic
// contribution for joint exchange. Thus it is experimental,
// is provided ``as is'', with no warranties of any kind
// whatsoever, no support, no promise of updates, or printed
// documentation. By using this software, you acknowledge
// that the Lawrence Berkeley National Laboratory and
// Regents of the University of California shall have no
// liability with respect to the infringement of other
// copyrights by any part of this software.
#ifndef _MESH_REFINE_H_
#define _MESH_REFINE_H_
// Include files:
#include <climits>
#include "Vector.H"
#include "Box.H"
#include "IntVectSet.H"
#include "REAL.H"
#include "ProblemDomain.H"
// Constants:
class MeshRefine
{
public:
MeshRefine();
MeshRefine(
const Box& a_baseDomain,
const Vector<int>& a_refRatios,
const Real a_fillRatio,
const int a_blockFactor,
const int a_bufferSize,
const int a_maxSize);
MeshRefine(
const ProblemDomain& a_baseDomain,
const Vector<int>& a_refRatios,
const Real a_fillRatio,
const int a_blockFactor,
const int a_bufferSize,
const int a_maxSize);
virtual ~MeshRefine();
void define(
const Box& a_baseDomain,
const Vector<int>& a_refRatios,
const Real a_fillRatio,
const int a_blockFactor,
const int a_bufferSize,
const int a_maxSize);
void define(
const ProblemDomain& a_baseDomain,
const Vector<int>& a_refRatios,
const Real a_fillRatio,
const int a_blockFactor,
const int a_bufferSize,
const int a_maxSize);
virtual int regrid(
Vector<Vector<Box> >& a_newmeshes,
const IntVectSet& a_tags,
const int a_baseLevel,
const int a_topLevel,
const Vector<Vector<Box> >& a_oldMeshes) const;
virtual int regrid(
Vector<Vector<Box> >& a_newmeshes,
const Vector<IntVectSet>& a_tags,
const int a_baseLevel,
const int a_topLevel,
const Vector<Vector<Box> >& a_oldMeshes) const;
// Access functions
const Vector<int>& refRatios() const;
Real fillRatio() const;
int blockFactor() const;
int bufferSize() const;
int maxSize() const;
void refRatios(const Vector<int>& a_nRefVect);
void fillRatio(const Real a_fill_ratio);
void blockFactor(const int a_block_factor);
void bufferSize(const int a_buffer_size);
void maxSize(const int a_max_size);
bool isDefined() const;
void granularity(int a_granularity);
virtual void
makeBoxes(
Vector<Box>& a_mesh,
const IntVectSet& a_tags,
const IntVectSet& a_pnd,
const ProblemDomain& a_domain,
const int a_maxSize) const = 0;
protected:
virtual void
computeLocalBlockFactors();
virtual void
makePNDs(
Vector<IntVectSet>& a_pnds,
const int a_baseLevel,
const int a_topLevel,
const Vector<ProblemDomain>& a_domains,
const IntVectSet& a_baseMesh,
const Vector<int>& a_bufferSize ) const;
// local data members
bool m_isDefined;
Vector<ProblemDomain> m_vectDomains;
Vector<int> m_nRefVect;
Real m_fillRatio;
int m_blockFactor;
Vector<int> m_level_blockfactors;
int m_bufferSize;
int m_maxSize;
int m_granularity;
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -