ESPResSo 3.2.0-159-gf5c8922-git
Extensible Simulation Package for Soft Matter Research
steppot.c
Go to the documentation of this file.
00001 /*
00002   Copyright (C) 2010,2011,2012,2013 The ESPResSo project
00003   Copyright (C) 2002,2003,2004,2005,2006,2007,2008,2009,2010 
00004     Max-Planck-Institute for Polymer Research, Theory Group
00005   
00006   This file is part of ESPResSo.
00007   
00008   ESPResSo is free software: you can redistribute it and/or modify
00009   it under the terms of the GNU General Public License as published by
00010   the Free Software Foundation, either version 3 of the License, or
00011   (at your option) any later version.
00012   
00013   ESPResSo is distributed in the hope that it will be useful,
00014   but WITHOUT ANY WARRANTY; without even the implied warranty of
00015   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016   GNU General Public License for more details.
00017   
00018   You should have received a copy of the GNU General Public License
00019   along with this program.  If not, see <http://www.gnu.org/licenses/>. 
00020 */
00021 /** \file steppot.c
00022  *
00023  *  Implementation of \ref steppot.h
00024  */
00025 #include "steppot.h"
00026 
00027 #ifdef SMOOTH_STEP
00028 #include "communication.h"
00029 
00030 int smooth_step_set_params(int part_type_a, int part_type_b,
00031                            double d, int n, double eps,
00032                            double k0, double sig,
00033                            double cut)
00034 {
00035   IA_parameters *data = get_ia_param_safe(part_type_a, part_type_b);
00036   
00037   if (!data) return ES_ERROR;
00038   
00039   data->SmSt_eps    = eps;
00040   data->SmSt_sig    = sig;
00041   data->SmSt_cut    = cut;
00042   data->SmSt_d      = d;
00043   data->SmSt_n      = n;
00044   data->SmSt_k0     = k0;
00045  
00046   /* broadcast interaction parameters */
00047   mpi_bcast_ia_params(part_type_a, part_type_b);
00048 
00049   return ES_OK;
00050 }
00051 
00052 #endif