! ! CDDL HEADER START ! ! The contents of this file are subject to the terms of the Common Development ! and Distribution License Version 1.0 (the "License"). ! ! You can obtain a copy of the license at ! http://www.opensource.org/licenses/CDDL-1.0. See the License for the ! specific language governing permissions and limitations under the License. ! ! When distributing Covered Code, include this CDDL HEADER in each file and ! include the License file in a prominent location with the name LICENSE.CDDL. ! If applicable, add the following below this CDDL HEADER, with the fields ! enclosed by brackets "[]" replaced with your own identifying information: ! ! ! CDDL HEADER END ! ! ! Copyright (c) 2012, Mark R. Gilbert, CCFE Fusion Association. All rights reserved. ! ! Contributors: ! Mark R. Gilbert ! Ellad B. Tadmor ! !**************************************************************************** !** !** MODULE eam_magnetic_2g_quintic !** !** EAM-like potential with quintic splines representing knot functions !** magnetic ability also available via B parameter !** !** Language: Fortran 2003 !** !** !** !**************************************************************************** module eam_magnetic_2g_quintic use, intrinsic :: iso_c_binding use kim_model_driver_headers_module implicit none save private public Compute_Energy_Forces, & compute_arguments_create, & compute_arguments_destroy, & destroy, & speccode, & buffer_type type, bind(c) :: buffer_type real(c_double) :: influence_distance real(c_double) :: cutoff(1) ! cutoff radius in angstroms real(c_double) :: cutsq(1) integer(c_int) :: n_V_DD,n_phi_DD real(c_double) :: A_DD,B_DD type(c_ptr) :: a_phi_DD,a_V_DD,r_phi_DD,r_V_DD, lambda_phi_DD, lambda_V_DD integer(c_int) :: & model_will_not_request_neighbors_of_noncontributing_particles(1) end type buffer_type ! Below are the definitions and values of all Model parameters integer(c_int), parameter :: cd = c_double ! used for literal constants integer(c_int), parameter :: DIM=3 ! dimensionality of space integer(c_int), parameter :: speccode = 1 ! internal species code contains !------------------------------------------------------------------------------- ! ! Miscellaneous helper functions ! !------------------------------------------------------------------------------- ! The "recursive" keyword is added below make this routine thread safe recursive function kfn(r0,r,lambda) implicit none real(c_double) :: r0,r,lambda,kfn if (r