重力直立六面体正演

这是一个使用Fortran编写的三维重力正演程序,用于直立六面体网格剖分。程序涉及读取计算点和场源坐标,计算核函数值,以及进行网格剖分等步骤,旨在模拟和分析地球重力异常。
摘要由CSDN通过智能技术生成

!************************************************************************************
!——————————————————————————————————–
!程序功能:多层网格剖分(直立六面体)
!——————————————————————————————————–
!——————————————————————————————————–
!参数说明:
! n_source:场源直立体单元的个数
! x_source:为存放场源ξ(i)、ξ(i+1)的数组
! y_source:为存放场源η(i)、η(i+1)的数组
! z_source:为存放场源ζ(i)、ζ(i+1)的数组
! n_coordinate:为计算点的个数
! x_coordinate:为存放计算点x方向的坐标
! x_coordinate:为存放计算点y方向的坐标
! z_coordinate:为存放计算点z方向的坐标
! filed:为存放迭代之后的计算所得的重力异常值
! G:为存放核函数值的数组
! X:为存放迭代场源剩余密度值
! D1:为存放迭代之前传输的重力异常值(二维数组,按照工区网格计算点存放数据)
! D:为存放迭代时所需的每一个计算点的重力异常
! M,N:为工区网格剖分的行和列的数值
!——————————————————————————————————–
PROGRAM GRAVITY_FORWARD_3D_INVERSION
implicit none

integer::n_coordinate,M,N,cengshu,n_source
REAL xmin,xmax,ymin,ymax
real,allocatable::x_source(:,:),y_source(:,:),z_source(:,:)
real,allocatable::x_coordinate(:),y_coordinate(:),z_coordinate(:)
real,allocatable::G(:,:)
integer,allocatable::n_source1(:)
real,allocatable::x1(:),x(:),y(:)
!!!读入基本参数
CALL INPUT_canshu(xmin,xmax,ymin,ymax,M,N,cengshu)
call read_mn(M,N,n_coordinate)

allocate(x_coordinate(1:N_COORDINATE),y_coordinate(1:N_COORDINATE),z_coordinate(1:n_coordinate),n_source1(1:cengshu))
call read_n_source(cengshu,n_source,n_source1)

allocate(G(1:N_COORDINATE,1:N_SOURCE))
allocate(x_source(1:n_source,1:2),y_source(1:n_source,1:2),z_source(1:n_source,1:2))
allocate(x1(1:n_source),x(1:n_source),y(1:n_source))
!!!计算核函数
!读入计算点的坐标
call input_coordinate_3d_vertical_reg(x_coordinate,y_coordinate,z_coordinate,n_coordinate)
!读入参数并计算场源的坐标(网格剖分)
call input_source_3d_vertical(n_source,cengshu,n_source1,x_source,y_source,z_source,M,N)

!计算核函数
call forward_3d_vertical_G(n_source,x_source,y_source,z_source,n_coordinate,x_coordinate,&
&y_coordinate,z_coordinate,G)
!pause
call zuobiao(n_source,x1,x,y,cengshu,n_source1)
!call zuobiao11(n_source)
END PROGRAM

!———————————————-
!功能:从参数文件中读取有关参数
!———————————————–
SUBROUTINE INPUT_canshu(xmin,xmax,ymin,ymax,M,N,cengshu)
implicit none
REAL xmin,xmax,ymin,ymax
INTEGER M,N,cengshu

     open(12,file='poufen_parameter.txt')
     READ(12,*)M,N
     read(12,*)xmin,xmax
     read(12,*)ymin,ymax
     read(12,*)cengshu
     close(12) 

END SUBROUTINE

!—————————————————-
!功能:读取规则网(.grd)(平面)计算点数据的个数
!—————————————————-
subroutine read_mn(M,N,n_coordinate)
implicit none
integer::M,N,n_coordinate
n_coordinate=n*m
End subroutine read_mn
!—————————————————-
!功能:读取场源个数
!—————————————————-
subroutine read_n_source(cengshu,N_source,n_source1)
implicit none
integer::cengshu,N_source,I
integer

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值