00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef DEBUGMESHBUILDER_H
00019 #define DEBUGMESHBUILDER_H
00020
00021 #include <iostream>
00022 #include "meshbuilder.h"
00023
00028 class DebugMeshBuilder : public MeshBuilder {
00029 public:
00030 DebugMeshBuilder(std::ostream* ostr) : _ostr(ostr)
00031 {}
00032 ~DebugMeshBuilder()
00033 {}
00035 virtual void set_coord(int i, double x, double y, double z) {
00036 (*_ostr) << "coord: " << i << ", " << x << ", " << y << ", " << z << "\n";
00037 }
00039 virtual void init_coord(int nof_node) {
00040 (*_ostr) << "nof_node: " << nof_node << "\n";
00041 }
00043 virtual void finalize_coord() {
00044 (*_ostr) << "finalize_coord called" << "\n";
00045 }
00047 virtual void init_tet(int nof_tet) {
00048 (*_ostr) << "nof_tet: " << nof_tet << "\n";
00049 }
00051 virtual void set_tet(int t, int id0, int id1, int id2, int id3) {
00052 (*_ostr) << "tet_node: " << t << ", " <<
00053 id0 << ", " << id1 << ", " << id2 << ", " << id3 << "\n";
00054 }
00056 virtual void finalize_tet() {
00057 (*_ostr) << "finalize_tet called" << "\n";
00058 }
00060 virtual void init_bc(int nof_bc_face) {
00061 (*_ostr) << "nof_bc_face: " << nof_bc_face << "\n";
00062 }
00064 virtual void set_bc(int id0, int id1, int id2, int bc_id) {
00065 (*_ostr) << "bc_face_node: " <<
00066 id0 << ", " << id1 << ", " << id2 << ", " << bc_id << "\n";
00067 }
00069 virtual void finalize_bc(int nof_sym) {
00070 (*_ostr) << "nof_sym: " << nof_sym << "\n";
00071 }
00072 private:
00074 std::ostream* _ostr;
00075 };
00076
00077 #endif