PSCF v1.3.3
ScftThermo.cu
1/*
2* PSCF - Polymer Self-Consistent Field
3*
4* Copyright 2015 - 2025, The Regents of the University of Minnesota
5* Distributed under the terms of the GNU General Public License.
6*/
7
8#include "ScftThermo.h"
9#include <rpg/solvers/Mixture.h>
10#include <rpg/solvers/Polymer.h>
11#include <rpg/solvers/Solvent.h>
12#include <rpg/field/Domain.h>
13#include <prdc/cuda/Reduce.h>
14#include <prdc/cuda/RField.h>
15#include <prdc/system/ScftThermoTmpl.tpp>
16#include <pscf/inter/Interaction.h>
17
18namespace Pscf {
19
20 namespace Prdc {
21 template class ScftThermoTmpl<1, Rpg::System<1> >;
22 template class ScftThermoTmpl<2, Rpg::System<2> >;
23 template class ScftThermoTmpl<3, Rpg::System<3> >;
24 }
25
26 namespace Rpg {
27
28 /*
29 * Constructor
30 */
31 template <int D>
35
36 /*
37 * Inner product of r-grid fields.
38 */
39 template <int D>
41 RFieldT const & B) const
42 { return Cuda::Reduce::innerProduct(A, B); };
43
44 // Explicit instantiation
45 template class ScftThermo<1>;
46 template class ScftThermo<2>;
47 template class ScftThermo<3>;
48
49 }
50}
Base class for SCFT thermodynamic property calculators.
Computes SCFT free energies.
double innerProduct(RFieldT const &A, RFieldT const &B) const override
Inner product of fields (sum of elements on a grid).
Definition ScftThermo.cu:40
typename Base::RFieldT RFieldT
Alias for r-grid field type.
ScftThermoTmpl< D, System< D > > Base
Alias for base class.
ScftThermo(System< D > const &system)
Constructor.
Definition ScftThermo.cu:32
Main class, representing a complete physical system.
cudaReal innerProduct(DeviceArray< cudaReal > const &a, DeviceArray< cudaReal > const &b)
Compute inner product of two real arrays (GPU kernel wrapper).
Definition Reduce.cu:891
Periodic fields and crystallography.
Definition CField.cpp:11
SCFT and PS-FTS with real periodic fields (GPU)
PSCF package top-level namespace.