1#ifndef RP_CONCENTRATION_DERIVATIVE_TPP
2#define RP_CONCENTRATION_DERIVATIVE_TPP
11#include "ConcentrationDerivative.h"
21 template <
int D,
class T>
23 typename T::Simulator& simulator,
24 typename T::System& system)
25 : AverageAnalyzerT(simulator, system)
31 template <
int D,
class T>
37 const int nMonomer = system().mixture().nMonomer();
40 double vMonomer = system().mixture().vMonomer();
41 const int meshSize = system().domain().mesh().size();
44 if (!system().c().hasData()) {
47 if (!simulator().hasWc()){
48 simulator().computeWc();
50 if (!simulator().hasHamiltonian()) {
51 simulator().computeHamiltonian();
53 double h = simulator().hamiltonian();
56 double dfdc = h * vMonomer;
59 double Hh = double(meshSize)/2.0 * vMonomer;
ConcentrationDerivative(typename T::Simulator &simulator, typename T::System &system)
Constructor.
double compute() override
Compute and return the derivative of H w/ respect to concentration.
void setClassName(const char *className)
Set class name string.
#define UTIL_CHECK(condition)
Assertion macro suitable for serial or parallel production code.
Class templates for real-valued periodic fields.
PSCF package top-level namespace.