JDFTx  1.2.0
Fmix.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_FMIX_H
21 #define JDFTX_FLUID_FMIX_H
22 
23 #include <core/ScalarFieldArray.h>
24 #include <string>
25 
26 class FluidMixture;
27 
29 class Fmix
30 {
31 public:
32  const GridInfo& gInfo;
33  const double T;
34 
36  Fmix(FluidMixture* fluidMixture);
37  virtual ~Fmix() {}
38 
39  virtual string getName() const=0;
40 
46  virtual double compute(const ScalarFieldTildeArray& Ntilde, ScalarFieldTildeArray& Phi_Ntilde) const=0;
47 
55  virtual double computeUniform(const std::vector<double>& N, std::vector<double>& Phi_N) const=0;
56 };
57 
58 #endif // JDFTX_FLUID_FMIX_H
virtual string getName() const =0
A string identifier for this mixing functional (used in EnergyComponent label)
Fmix(FluidMixture *fluidMixture)
Initialize base and register with this fluidMixture.
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
Abstract base class for mixing functionals: interactions between fluids (beyond hard sphere and scale...
Definition: Fmix.h:29
virtual double compute(const ScalarFieldTildeArray &Ntilde, ScalarFieldTildeArray &Phi_Ntilde) const =0
virtual double computeUniform(const std::vector< double > &N, std::vector< double > &Phi_N) const =0
classes ScalarFieldArray, ScalarFieldTildeArray and just enough operators to enable CG w...
std::vector< ScalarFieldTilde > ScalarFieldTildeArray
dynamic size collection of reciprocal space scalar fields
Definition: ScalarFieldArray.h:33