|
|
|
@ -34,68 +34,68 @@
|
|
|
|
|
! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
|
|
! POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
|
!
|
|
|
|
|
module amg_d_pde3d_base_mod
|
|
|
|
|
module amg_d_pde3d_const_mod
|
|
|
|
|
use psb_base_mod, only : psb_dpk_, done, dzero
|
|
|
|
|
real(psb_dpk_), save, private :: epsilon=done/80
|
|
|
|
|
contains
|
|
|
|
|
subroutine pde_set_parm3d_base(dat)
|
|
|
|
|
subroutine pde_set_parm3d_const(dat)
|
|
|
|
|
real(psb_dpk_), intent(in) :: dat
|
|
|
|
|
epsilon = dat
|
|
|
|
|
end subroutine pde_set_parm3d_base
|
|
|
|
|
end subroutine pde_set_parm3d_const
|
|
|
|
|
!
|
|
|
|
|
! functions parametrizing the differential equation
|
|
|
|
|
!
|
|
|
|
|
function b1_base(x,y,z)
|
|
|
|
|
function b1_const(x,y,z)
|
|
|
|
|
implicit none
|
|
|
|
|
real(psb_dpk_) :: b1_base
|
|
|
|
|
real(psb_dpk_) :: b1_const
|
|
|
|
|
real(psb_dpk_), intent(in) :: x,y,z
|
|
|
|
|
b1_base=done/sqrt(3.0_psb_dpk_)
|
|
|
|
|
end function b1_base
|
|
|
|
|
function b2_base(x,y,z)
|
|
|
|
|
b1_const=done/sqrt(3.0_psb_dpk_)
|
|
|
|
|
end function b1_const
|
|
|
|
|
function b2_const(x,y,z)
|
|
|
|
|
implicit none
|
|
|
|
|
real(psb_dpk_) :: b2_base
|
|
|
|
|
real(psb_dpk_) :: b2_const
|
|
|
|
|
real(psb_dpk_), intent(in) :: x,y,z
|
|
|
|
|
b2_base=done/sqrt(3.0_psb_dpk_)
|
|
|
|
|
end function b2_base
|
|
|
|
|
function b3_base(x,y,z)
|
|
|
|
|
b2_const=done/sqrt(3.0_psb_dpk_)
|
|
|
|
|
end function b2_const
|
|
|
|
|
function b3_const(x,y,z)
|
|
|
|
|
implicit none
|
|
|
|
|
real(psb_dpk_) :: b3_base
|
|
|
|
|
real(psb_dpk_) :: b3_const
|
|
|
|
|
real(psb_dpk_), intent(in) :: x,y,z
|
|
|
|
|
b3_base=dzero/sqrt(3.0_psb_dpk_)
|
|
|
|
|
end function b3_base
|
|
|
|
|
function c_base(x,y,z)
|
|
|
|
|
b3_const=dzero/sqrt(3.0_psb_dpk_)
|
|
|
|
|
end function b3_const
|
|
|
|
|
function c_const(x,y,z)
|
|
|
|
|
implicit none
|
|
|
|
|
real(psb_dpk_) :: c_base
|
|
|
|
|
real(psb_dpk_) :: c_const
|
|
|
|
|
real(psb_dpk_), intent(in) :: x,y,z
|
|
|
|
|
c_base=dzero
|
|
|
|
|
end function c_base
|
|
|
|
|
function a1_base(x,y,z)
|
|
|
|
|
c_const=dzero
|
|
|
|
|
end function c_const
|
|
|
|
|
function a1_const(x,y,z)
|
|
|
|
|
implicit none
|
|
|
|
|
real(psb_dpk_) :: a1_base
|
|
|
|
|
real(psb_dpk_) :: a1_const
|
|
|
|
|
real(psb_dpk_), intent(in) :: x,y,z
|
|
|
|
|
a1_base=epsilon
|
|
|
|
|
end function a1_base
|
|
|
|
|
function a2_base(x,y,z)
|
|
|
|
|
a1_const=epsilon
|
|
|
|
|
end function a1_const
|
|
|
|
|
function a2_const(x,y,z)
|
|
|
|
|
implicit none
|
|
|
|
|
real(psb_dpk_) :: a2_base
|
|
|
|
|
real(psb_dpk_) :: a2_const
|
|
|
|
|
real(psb_dpk_), intent(in) :: x,y,z
|
|
|
|
|
a2_base=epsilon
|
|
|
|
|
end function a2_base
|
|
|
|
|
function a3_base(x,y,z)
|
|
|
|
|
a2_const=epsilon
|
|
|
|
|
end function a2_const
|
|
|
|
|
function a3_const(x,y,z)
|
|
|
|
|
implicit none
|
|
|
|
|
real(psb_dpk_) :: a3_base
|
|
|
|
|
real(psb_dpk_) :: a3_const
|
|
|
|
|
real(psb_dpk_), intent(in) :: x,y,z
|
|
|
|
|
a3_base=epsilon
|
|
|
|
|
end function a3_base
|
|
|
|
|
function g_base(x,y,z)
|
|
|
|
|
a3_const=epsilon
|
|
|
|
|
end function a3_const
|
|
|
|
|
function g_const(x,y,z)
|
|
|
|
|
implicit none
|
|
|
|
|
real(psb_dpk_) :: g_base
|
|
|
|
|
real(psb_dpk_) :: g_const
|
|
|
|
|
real(psb_dpk_), intent(in) :: x,y,z
|
|
|
|
|
g_base = dzero
|
|
|
|
|
g_const = dzero
|
|
|
|
|
if (x == done) then
|
|
|
|
|
g_base = done
|
|
|
|
|
g_const = done
|
|
|
|
|
else if (x == dzero) then
|
|
|
|
|
g_base = done
|
|
|
|
|
g_const = done
|
|
|
|
|
end if
|
|
|
|
|
end function g_base
|
|
|
|
|
end module amg_d_pde3d_base_mod
|
|
|
|
|
end function g_const
|
|
|
|
|
end module amg_d_pde3d_const_mod
|
|
|
|
|