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);
58 if (!system().hasCFields()) {
61 if (!simulator().hasWc()){
62 simulator().computeWc();
64 if (!simulator().hasHamiltonian()) {
65 simulator().computeHamiltonian();
67 double hField = simulator().fieldHamiltonian()/nMonomerSystem;
70 double dfdchi = -(hField - 0.5*simulator().sc(nMonomer - 1))/chi + 1.0/4.0;
72 dfdchi *= nMonomerSystem;
75 dfdchi += double(meshSize)/(2.0 * chi);