44 const int nMonomer = system().mixture().nMonomer();
47 const double vSystem = system().domain().unitCell().volume();
48 const double vMonomer = system().mixture().vMonomer();
49 const double nMonomerSystem = vSystem / vMonomer;
50 const int meshSize = system().domain().mesh().size();
51 double chi = system().interaction().chi(0,1);
54 if (!system().hasCFields()) {
57 if (!simulator().hasWc()){
58 simulator().computeWc();
60 if (!simulator().hasHamiltonian()) {
61 simulator().computeHamiltonian();
65 double hField = simulator().fieldHamiltonian()/nMonomerSystem;
68 double dfdchi = -(hField - 0.5*simulator().sc(nMonomer - 1))/chi
72 dfdchi *= nMonomerSystem;
75 dfdchi += double(meshSize)/(2.0 * chi);