00001 #ifndef GRAL_GB_CARTESIAN2D_TEST_CARTESIAN_GEOMETRY_2D_H
00002 #define GRAL_GB_CARTESIAN2D_TEST_CARTESIAN_GEOMETRY_2D_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00021 #include "Gral/Base/common-grid-basics.h"
00022
00023 namespace GrAL {
00024
00032 template<class GEOM>
00033 void test_cartesian2d_geometry(GEOM & Geo, ::std::ostream& out)
00034 {
00035 typedef grid_types<typename GEOM::grid_type> gt;
00036
00037 for(typename gt::VertexIterator v(Geo.TheGrid()); !v.IsDone(); ++v)
00038 out << "v=" << (*v).index() << " @ " << Geo.coord(*v) << "\n";
00039 for(typename gt::EdgeIterator e(Geo.TheGrid()); ! e.IsDone(); ++e)
00040 out << "e=[" << (*e).V1().index() << " -> " << (*e).V2().index() << "] "
00041 << " length(e)=" << Geo.length(*e)
00042 << " center(e)=" << Geo.center(*e)
00043 << " normal(e)=" << Geo.normal(*e)
00044 << "\n";
00045 for(typename gt::CellIterator c(Geo.TheGrid()); !c.IsDone(); ++c) {
00046 out << "c=" << (*c).index()
00047 << " volume(c)=" << Geo.volume(*c)
00048 << " center(c)=" << Geo.center(*c)
00049 << "\n";
00050 for(typename gt::FacetOnCellIterator fc(*c); !fc.IsDone(); ++fc)
00051 out << "fc=[" << fc.V1().index() << " -> " << fc.V2().index() << "] "
00052 << " outer_area_normal(fc)=" << Geo.outer_area_normal(fc)
00053 << " outer_normal(fc)=" << Geo.outer_normal(fc)
00054 << "\n";
00055 }
00056
00057 }
00058
00059 }
00060
00061 #endif
00062