// BemIsolDoc.h : interface of the CBemIsolDoc class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_BEMISOLDOC_H__66CCB1B4_1064_11D3_AAFC_E1204C4ACF35__INCLUDED_)
#define AFX_BEMISOLDOC_H__66CCB1B4_1064_11D3_AAFC_E1204C4ACF35__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

class CNode;
class CElement;
class CIntPoint;
class CIntElem;
class CWell;
class CLine;

class CBemIsolDoc : public CDocument
{
protected: // create from serialization only
	CBemIsolDoc();
	DECLARE_DYNCREATE(CBemIsolDoc)

// Attributes
public:
	CObArray Nodes,Elems,TriElems,IntNods,Wells,Lines;
	LOGFONT lfnt;
	CString name;
	float kx,ky,thick,precip,gcb[6],rprec;
	float fmin,fmax,step,*xsi,*ysi,*fpol;
	int npx,npy,decpo;
	CWordArray pol;
	CSize m_size;
	CArray <float,float> Isolin;

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CBemIsolDoc)
	public:
	virtual BOOL OnNewDocument();
	virtual void Serialize(CArchive& ar);
	virtual BOOL OnOpenDocument(LPCTSTR lpszPathName);
	virtual void DeleteContents();
	//}}AFX_VIRTUAL

// Implementation
public:
	void ChangeFont();
	int LabLine (CPoint pt);
	void PlotLine (CDC* pDC, int il);
	void OpenIsol();
	BOOL InterIsoNon();
	void PlotLines (CDC *pDC);
	BOOL InterIsoReg();
	float bipol (float *a,float x,float y);
	void bazf (float *fp,float *ap);
	void PlotWells(CDC *td,int sz);
	void PlotElem (CDC *td,BOOL IsNum);
	CLine* AddLine (float w,float x1,float y1,float x2,float y2);
	double Cell (double x1,double x2,double y1,double y2,double x0,double y0,double tt);
	void Integ (double xp,double yp,double x1,double y1,double x2,double y2,double& hp,double& gp,double tt);
	void InterIso (CDC& td);
	CPoint TranCoord(float x,float y);
	void Potenc (CDC& td);
	void ScaleNods (CRect rc);
	CSize GetDocSize();
	CIntElem* GetIntElem(int i);
	CIntPoint* GetIntPt(int i);
	CElement* GetElement(int i);
	CNode* GetNode(int i);
	CWell* GetWell(int i);
	void GenerNet (int nx,int ny);
	void TabWell(float deltx,float delty,float ximin,float yimin);
	void PlotIntPt (CDC* pDC,int sz,BOOL IsNum);
	void PlotNod (CDC* pDC,int sz,BOOL IsNum);
	virtual ~CBemIsolDoc();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
	//{{AFX_MSG(CBemIsolDoc)
	afx_msg void OnIsolSave();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_BEMISOLDOC_H__66CCB1B4_1064_11D3_AAFC_E1204C4ACF35__INCLUDED_)
