// FieldEnergy.cpp: FieldEnergy クラスのインプリメンテーション // ////////////////////////////////////////////////////////////////////// #include "stdafx.h" #include "MeshEditor.h" #include "FieldEnergy.h" #include "math.h" #ifdef _DEBUG #undef THIS_FILE static char THIS_FILE[]=__FILE__; #define new DEBUG_NEW #endif ////////////////////////////////////////////////////////////////////// // 構築/消滅 ////////////////////////////////////////////////////////////////////// FieldEnergy::FieldEnergy() { } FieldEnergy::~FieldEnergy() { } float FieldEnergy::func(float p[]) { double E = 0; for(int i=0; iphi = phi; this->n = n; this->link = link; this->degree = degree; } void FieldEnergy::dfunc(float p[], float d[]) { for(int i=0; i