00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #include <cassert>
00029 #include "AbstractMeshReader.hpp"
00030 #include "Exception.hpp"
00031
00033
00035
00036 template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
00037 unsigned AbstractMeshReader<ELEMENT_DIM, SPACE_DIM>::GetNumElementAttributes() const
00038 {
00039
00040
00041 return 0;
00042 }
00043
00044 template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
00045 unsigned AbstractMeshReader<ELEMENT_DIM, SPACE_DIM>::GetNumEdges() const
00046 {
00047 return GetNumFaces();
00048 }
00049
00050 template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
00051 unsigned AbstractMeshReader<ELEMENT_DIM, SPACE_DIM>::GetNumFaceAttributes() const
00052 {
00053
00054
00055 return 0;
00056 }
00057
00058 template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
00059 std::vector<double> AbstractMeshReader<ELEMENT_DIM, SPACE_DIM>::GetNodeAttributes()
00060 {
00061
00062
00063 std::vector<double> empty;
00064 return empty;
00065 }
00066
00067 template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
00068 ElementData AbstractMeshReader<ELEMENT_DIM, SPACE_DIM>::GetNextEdgeData()
00069 {
00070 return GetNextFaceData();
00071 }
00072
00073
00074 template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
00075 std::vector<double> AbstractMeshReader<ELEMENT_DIM, SPACE_DIM>::GetNode(unsigned index)
00076 {
00077 EXCEPTION("Random access is only implemented in mesh readers for binary mesh files.");
00078 }
00079
00080 template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
00081 ElementData AbstractMeshReader<ELEMENT_DIM, SPACE_DIM>::GetElementData(unsigned index)
00082 {
00083 EXCEPTION("Random access is only implemented in mesh readers for binary mesh files.");
00084 }
00085
00086 template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
00087 ElementData AbstractMeshReader<ELEMENT_DIM, SPACE_DIM>::GetFaceData(unsigned index)
00088 {
00089 EXCEPTION("Random access is only implemented in mesh readers for binary mesh files.");
00090 }
00091
00092 template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
00093 ElementData AbstractMeshReader<ELEMENT_DIM, SPACE_DIM>::GetEdgeData(unsigned index)
00094 {
00095 return GetFaceData(index);
00096 }
00097
00098 template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
00099 std::vector<unsigned> AbstractMeshReader<ELEMENT_DIM, SPACE_DIM>::GetContainingElementIndices(unsigned index)
00100 {
00101 EXCEPTION("Ncl files are only implemented in mesh readers for binary mesh files.");
00102 }
00103
00104 template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
00105 std::string AbstractMeshReader<ELEMENT_DIM, SPACE_DIM>::GetMeshFileBaseName()
00106 {
00107 return "";
00108 }
00109
00110 template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
00111 bool AbstractMeshReader<ELEMENT_DIM, SPACE_DIM>::IsFileFormatBinary()
00112 {
00113 return false;
00114 }
00115
00116 template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
00117 bool AbstractMeshReader<ELEMENT_DIM, SPACE_DIM>::HasNclFile()
00118 {
00119 return false;
00120 }
00121
00122
00123
00124
00125 template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
00126 unsigned AbstractMeshReader<ELEMENT_DIM, SPACE_DIM>::GetNumCableElements() const
00127 {
00128 return 0u;
00129 }
00130
00131 template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
00132 unsigned AbstractMeshReader<ELEMENT_DIM, SPACE_DIM>::GetNumCableElementAttributes() const
00133 {
00134 return 0u;
00135 }
00136
00137 template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
00138 ElementData AbstractMeshReader<ELEMENT_DIM, SPACE_DIM>::GetNextCableElementData()
00139 {
00140 EXCEPTION("Cable elements are not supported by this mesh format.");
00141 }
00142
00143
00145
00147
00148 template class AbstractMeshReader<0,1>;
00149 template class AbstractMeshReader<1,1>;
00150 template class AbstractMeshReader<1,2>;
00151 template class AbstractMeshReader<1,3>;
00152 template class AbstractMeshReader<2,2>;
00153 template class AbstractMeshReader<2,3>;
00154 template class AbstractMeshReader<3,3>;