FEBio  1.5.0
FEBio/FEException.h
00001 // FEException.h: interface for the FEException class.
00002 //
00004 
00005 #if !defined(AFX_FEEXCEPTION_H__A56BADF1_E3BA_4482_AE23_EA40A591ED88__INCLUDED_)
00006 #define AFX_FEEXCEPTION_H__A56BADF1_E3BA_4482_AE23_EA40A591ED88__INCLUDED_
00007 
00008 #if _MSC_VER > 1000
00009 #pragma once
00010 #endif // _MSC_VER > 1000
00011 
00012 class FEElement;
00013 class FEM;
00014 
00015 #include "mat3d.h"
00016 #include <vector>
00017 using namespace std;
00018 
00019 class FEException  
00020 {
00021 public:
00022         FEException();
00023         virtual ~FEException();
00024 
00025 };
00026 
00027 class NegativeJacobian : public FEException
00028 {
00029 public:
00030         NegativeJacobian(int iel, int ng, double vol, FEElement* pe = 0)
00031         {
00032                 m_iel = iel;
00033                 m_ng = ng;
00034                 m_vol = vol;
00035                 m_pel = pe;
00036         }
00037 
00038         int             m_iel;  // element where the jacobian was negative
00039         int             m_ng;   // integration point
00040         double  m_vol;  // volume
00041         FEElement*      m_pel;  // pointer to element
00042 };
00043 
00044 class ZeroDiagonal : public FEException
00045 {
00046 private:
00047         struct EQUATION
00048         {
00049                 int     node;   // node
00050                 int     dof;    // degree of node
00051         };
00052 
00053 public:
00054         ZeroDiagonal(int node, int dof);
00055 
00056         char m_szerr[256];      // the error message
00057 };
00058 
00059 class EnergyDiverging : public FEException {};
00060 
00061 class MaxStiffnessReformations : public FEException {};
00062 
00063 class ZeroLinestepSize : public FEException {};
00064 
00065 class ExitRequest {};
00066 
00067 class ForceConversion {};
00068 
00069 class IterationFailure {};
00070 
00071 class NANDetected {};
00072 
00073 class FatalError {};
00074 
00075 class FEMultiScaleException
00076 {
00077 public:
00078         FEMultiScaleException(mat3d F) { m_F = F; }
00079 public:
00080         mat3d m_F;
00081 };
00082 
00083 
00084 #endif // !defined(AFX_FEEXCEPTION_H__A56BADF1_E3BA_4482_AE23_EA40A591ED88__INCLUDED_)