gctl_potential/lib/potential/gm_regular_grid.h

125 lines
5.0 KiB
C
Raw Normal View History

2024-09-10 19:56:41 +08:00
/********************************************************
*
*
*
*
*
*
* Geophysical Computational Tools & Library (GCTL)
*
* Copyright (c) 2022 Yi Zhang (yizhang-geo@zju.edu.cn)
*
* GCTL is distributed under a dual licensing scheme. You can redistribute
* it and/or modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation, either version 2
* of the License, or (at your option) any later version. You should have
* received a copy of the GNU Lesser General Public License along with this
* program. If not, see <http://www.gnu.org/licenses/>.
*
* If the terms and conditions of the LGPL v.2. would prevent you from using
* the GCTL, please consider the option to obtain a commercial license for a
* fee. These licenses are offered by the GCTL's original author. As a rule,
* licenses are provided "as-is", unlimited in time for a one time fee. Please
* send corresponding requests to: yizhang-geo@zju.edu.cn. Please do not forget
* to include some description of your company and the realm of its activities.
* Also add information on how to contact you by electronic and paper mail.
******************************************************/
#ifndef _GM_REGULAR_GRID_H
#define _GM_REGULAR_GRID_H
#include "gctl/mesh/regular_grid.h"
#include "gm_data.h"
namespace gctl
{
/**
* @brief
*
*
* 线-
*/
class gm_regular_grid : public regular_grid
{
public:
gm_regular_grid(); ///< 构造函数
virtual ~gm_regular_grid(); ///< 析构函数
/**
* @brief
*
* @param[in] in_name
* @param[in] in_info
* @param[in] xnum x方向的节点数量
* @param[in] ynum y方向的节点数量
* @param[in] xmin x方向的最小值
* @param[in] ymin y方向的最小值
* @param[in] dx x方向的网格间隔
* @param[in] dy y方向的网格间隔
*/
gm_regular_grid(std::string in_name, std::string in_info, int xnum, int ynum,
double xmin, double ymin, double dx, double dy);
/**
* The following functions require the FFTW library. Turn off the macro GCTL_FFTW to disable these functions
*/
#ifdef GCTL_POTENTIAL_FFTW3
/**
* @brief
*
* @param[in] datname
* @param[in] gradname
* @param[in] c_type TzxTzy或Tzz其中之一
* @param[in] order
*/
void gradient(std::string datname, std::string gradname, gravitational_field_type_e c_type = Tzz, int order = 1);
/**
* @brief
*
* @param[in] datname
* @param[in] rtpname
* @param[in] inc
* @param[in] dec
*/
void rtp(std::string datname, std::string rtpname, double inc, double dec);
/**
* @brief
*
* @param[in] datname
* @param[in] incname
* @param[in] decname
* @param[in] drtpname
* @param[in] order
*/
void drtp(std::string datname, std::string incname, std::string decname, std::string drtpname, int order = 1);
/**
* @brief
*
* @param[in] datname
* @param[in] retname
* @param[in] height
*/
void conti(std::string datname, std::string retname, double height);
#endif //GCTL_POTENTIAL_FFTW3
/**
* @brief
*
* @param datname
* @param regname
* @param resname
* @param wx_size
* @param wy_size
* @param x_order
* @param y_order
*/
void trend(std::string datname, std::string regname, std::string resname, int wx_size, int wy_size, int x_order, int y_order);
};
}
#endif //_GM_REGULAR_GRID_H