1#ifndef RPG_CONCENTRATION_DERIVATIVE_TPP
2#define RPG_CONCENTRATION_DERIVATIVE_TPP
11#include "ConcentrationDerivative.h"
13#include <rpg/System.h>
14#include <rpg/fts/simulator/Simulator.h>
15#include <rpg/fts/perturbation/Perturbation.h>
44 const int nMonomer = system().mixture().nMonomer();
47 double vMonomer = system().mixture().vMonomer();
48 const int meshSize = system().domain().mesh().size();
51 if (!system().hasCFields()) {
54 if (!simulator().hasWc()){
55 simulator().computeWc();
57 if (!simulator().hasHamiltonian()) {
58 simulator().computeHamiltonian();
62 double h = simulator().hamiltonian();
65 double dfdc = h * vMonomer;
68 double Hh = double(meshSize)/2.0 * vMonomer;
77 if (simulator().hasRamp() && nSamplePerOutput() == 1) {
78 double vMonomer = system().mixture().vMonomer();
81 outputFile_ <<
Int(step);
82 outputFile_ <<
Dbl(vMonomer);
83 outputFile_ <<
Dbl(value);
Analyze averages and block averages of several real variables.
virtual void outputValue(int step, double value)
Output a sampled or block average value.
void setClassName(const char *className)
Set class name string.
ConcentrationDerivative(Simulator< D > &simulator, System< D > &system)
Constructor.
virtual void outputValue(int step, double value)
Output a sampled or block average value.
virtual ~ConcentrationDerivative()
Destructor.
virtual double compute()
Compute and return the derivative of H w/ respect to concentration.
Field theoretic simulator (base class).
Main class for calculations that represent one system.
Wrapper for a double precision number, for formatted ostream output.
Wrapper for an int, for formatted ostream output.
#define UTIL_CHECK(condition)
Assertion macro suitable for serial or parallel production code.
PSCF package top-level namespace.
Utility classes for scientific computation.