1#ifndef RP_CONCENTRATION_DERIVATIVE_TPP
2#define RP_CONCENTRATION_DERIVATIVE_TPP
11#include "ConcentrationDerivative.h"
13#include <rp/system/System.h>
14#include <rp/fts/simulator/Simulator.h>
15#include <rp/solvers/Mixture.h>
16#include <rp/field/Domain.h>
17#include <rp/field/WFields.h>
18#include <rp/field/CFields.h>
28 template <
int D,
class T>
38 template <
int D,
class T>
44 const int nMonomer = system().mixture().nMonomer();
47 double vMonomer = system().mixture().vMonomer();
48 const int meshSize = system().domain().mesh().size();
51 if (!system().c().hasData()) {
54 if (!simulator().hasWc()){
55 simulator().computeWc();
57 if (!simulator().hasHamiltonian()) {
58 simulator().computeHamiltonian();
60 double h = simulator().hamiltonian();
63 double dfdc = h * vMonomer;
66 double Hh = double(meshSize)/2.0 * vMonomer;
Simulator< D, T > & simulator()
Get the parent Simulator by reference.
System< D, T > & system()
Get the parent System by reference.
AverageAnalyzer(Simulator< D, T > &simulator, System< D, T > &system)
Constructor.
virtual double compute()=0
Compute value of sampled quantity.
ConcentrationDerivative(Simulator< D, T > &simulator, System< D, T > &system)
Constructor.
Base class for field theoretic PS-FTS simulator.
Base class template for classes that represent a complete system.
void setClassName(const char *className)
Set class name string.
#define UTIL_CHECK(condition)
Assertion macro suitable for serial or parallel production code.
Code for programs that simulate real-valued periodic fields.
PSCF package top-level namespace.