JDFTx  1.2.0
Fex.h
1 /*-------------------------------------------------------------------
2 Copyright 2011 Ravishankar Sundararaman
3 
4 This file is part of JDFTx.
5 
6 JDFTx is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
10 
11 JDFTx is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15 
16 You should have received a copy of the GNU General Public License
17 along with JDFTx. If not, see <http://www.gnu.org/licenses/>.
18 -------------------------------------------------------------------*/
19 
20 #ifndef JDFTX_FLUID_FEX_H
21 #define JDFTX_FLUID_FEX_H
22 
23 #include <fluid/Molecule.h>
24 #include <core/ScalarField.h>
25 class FluidMixture;
26 struct FluidComponent;
27 
29 class Fex
30 {
31 public:
32  const Molecule& molecule;
33  const GridInfo& gInfo;
34  const double T;
35 
36  Fex(const FluidMixture*, const FluidComponent*);
37  virtual ~Fex() {}
38 
41  virtual double compute(const ScalarFieldTilde* Ntilde, ScalarFieldTilde* Phi_Ntilde) const=0;
42 
47  virtual double computeUniform(const double* N, double* Phi_N) const=0;
48 };
49 
50 #endif // JDFTX_FLUID_FEX_H
Simulation grid descriptor.
Definition: GridInfo.h:45
Mixture of fluids that provides the total free energy functional for minimization Constructing Fex an...
Definition: FluidMixture.h:32
std::shared_ptr< ScalarFieldTildeData > ScalarFieldTilde
A smart reference-counting pointer to ScalarFieldTildeData.
Definition: ScalarField.h:45
Multi-site molecule model.
Definition: Molecule.h:31
Real and complex scalar fields in real and reciprocal space.
Abstract base class for excess functionals.
Definition: Fex.h:29
virtual double compute(const ScalarFieldTilde *Ntilde, ScalarFieldTilde *Phi_Ntilde) const =0
virtual double computeUniform(const double *N, double *Phi_N) const =0
Named fluid components for which bulk properties / geometries / excess functionals are available...
Definition: FluidComponent.h:27