You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
AppFlow/FITK_Interface/FITKInterfaceMeshGen/FITKRegionMeshSize.h

218 lines
6.3 KiB
C

/**
*
* @file FITKRegionMeshSize.h
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-07-17
*
*/
#ifndef _FITK_REGION_MESH_SIZE_H___
#define _FITK_REGION_MESH_SIZE_H___
#include "FITKInterfaceMeshGenAPI.h"
#include "FITKGlobalMeshSizeInfo.h"
#include "FITK_Kernel/FITKCore/FITKAbstractDataManager.hpp"
#include <QHash>
#include <QList>
namespace Interface
{
/**
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-07-17
*/
class FITKInterfaceMeshGenAPI FITKAbstractRegionMeshSize
:public FITKGlobalMeshSizeInfo
{
Q_OBJECT
FITKCLASS(Interface, FITKAbstractRegionMeshSize);
public:
/**
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-07-17
*/
enum RegionType
{
RegionNone,
RigonFromFile,
RigonGeom,
RegionBox,
RegionCylinder,
RegionSphere,
RegionUserDef1,
RegionUserDef2,
RegionUserDef3,
RegionUserDef4,
RegionUserDef5,
};
Q_ENUM(RegionType);
/**
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-07-17
*/
enum BoundaryType
{
BTEmpty,
BTPatch,
BTWall,
BTSymmetry,
BTUDF1,
BTUDF2,
BTUDF3,
BTUDF4,
BTUDF5,
};
Q_ENUM(BoundaryType);
public:
/**
* @brief Construct a new FITKAbstractRegionMeshSize object
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-07-17
*/
explicit FITKAbstractRegionMeshSize() = default;
/**
* @brief Destroy the FITKAbstractRegionMeshSize object
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-07-17
*/
virtual ~FITKAbstractRegionMeshSize() = 0;
/**
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-07-17
* @return RegionType
*/
virtual RegionType getRegionType() = 0;
/**
* @brief
* @param[i] dim 0-2
* @param[i] divNum
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-07-17
*/
void setDivision(int dim, int divNum);
/**
* @brief
* @param[i] dim 0-2
* @param[i] grad
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-07-17
*/
void setGrading(int dim, double grad);
/**
* @brief
* @param[i] dim 0-2
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-07-17
* @return int
*/
int getDivision(int dim);
/**
* @brief
* @param[i] dim 0-2
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-07-17
* @return double
*/
double getGrading(int dim);
/**
* @brief
* @param[i] faceID ID
* @param[i] bt
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-07-17
*/
void insertBoundary(int faceID, BoundaryType bt);
/**
* @brief
* @param[i] faceID ID
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-07-17
* @return BoundaryType
*/
BoundaryType getBoundary(int faceID);
/**
* @brief
* @param[i] faceID
* @param[i] bn
* @return void
* @author liuzhonghua (liuzhonghuaszch@163.com)
* @date 2024-09-03
*/
void insertFaceName(int faceID, QString bn);
/**
* @brief
* @param[i] faceID
* @return QString
* @author liuzhonghua (liuzhonghuaszch@163.com)
* @date 2024-09-03
*/
QString getFaceName(int faceID);
protected:
/**
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-07-17
*/
int _division[3] = { 10,10,10 };
/**
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-07-17
*/
double _grading[3] = { 1,1,1 };
/**
* @brief ID-
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-07-17
*/
QHash<int, BoundaryType> _boundarys{};
/**
* @brief
* @author liuzhonghua (liuzhonghuaszch@163.com)
* @date 2024-09-03
*/
QHash<int, QString> _facesName{};
};
/**
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-07-17
*/
class FITKInterfaceMeshGenAPI FITKRegionMeshSizeManager :
public Core::FITKAbstractDataManager<FITKAbstractRegionMeshSize>
{
public:
/**
* @brief Construct a new FITKRegionMeshSizeManager object
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-07-17
*/
explicit FITKRegionMeshSizeManager() = default;
/**
* @brief Destroy the FITKRegionMeshSizeManager object
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-07-17
*/
virtual ~FITKRegionMeshSizeManager() = default;
/**
* @brief
* @param[i] rt
* @return QList<FITKAbstractRegionMeshSize*>
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-07-17
*/
QList<FITKAbstractRegionMeshSize*> getRigonByType(FITKAbstractRegionMeshSize::RegionType rt);
};
}
#endif