36 {-1.f/6.f, 1.f/6.f, 1.},
37 {-1.f/6.f, 0.5, 1.f/6.f},
49 _current_point(0., 0.)
52 libmesh_experimental();
77 if (this->
mesh().processor_id() == 0)
87 _out.open(fname.c_str());
91 libmesh_file_error(fname.c_str());
99 const Real percent_padding = 0.01;
100 const Real dx=bbox.second(0)-bbox.first(0); libmesh_assert_greater (dx, 0.0);
101 const Real dy=bbox.second(1)-bbox.first(1); libmesh_assert_greater (dy, 0.0);
103 const Real x_min = bbox.first(0) - percent_padding*dx;
104 const Real y_min = bbox.first(1) - percent_padding*dy;
105 const Real x_max = bbox.second(0) + percent_padding*dx;
106 const Real y_max = bbox.second(1) + percent_padding*dy;
111 const Real width = 300;
112 _scale = width / (x_max-x_min);
117 std::time_t time1= std::time (0);
118 std::tm * time = std::localtime(&time1);
119 _out <<
"%!PS-Adobe-2.0 EPSF-1.2" <<
'\n' 121 <<
"%%Filename: " << fname <<
'\n' 122 <<
"%%Title: LibMesh Output" <<
'\n' 123 <<
"%%Creator: LibMesh: A C++ finite element library" <<
'\n' 124 <<
"%%Creation Date: " 125 << time->tm_year+1900 <<
"/" 126 << time->tm_mon+1 <<
"/" 127 << time->tm_mday <<
" - " 128 << time->tm_hour <<
":" 129 << std::setw(2) << time->tm_min <<
":" 130 << std::setw(2) << time->tm_sec <<
'\n' 135 <<
static_cast<unsigned int>( rint((x_max-x_min) *
_scale ))
137 << static_cast<unsigned int>( rint((y_max-y_min) *
_scale ))
148 _out <<
"/m {moveto} bind def" <<
'\n' 149 <<
"/l {lineto} bind def" <<
'\n' 150 <<
"/s {setrgbcolor} bind def" <<
'\n' 151 <<
"/sg {setgray} bind def" <<
'\n' 152 <<
"/cs {curveto stroke} bind def" <<
'\n' 153 <<
"/lx {lineto closepath stroke} bind def" <<
'\n' 154 <<
"/lf {lineto closepath fill} bind def" <<
'\n';
156 _out <<
"%%EndProlog" <<
'\n';
163 _out <<
"1 setlinecap" <<
'\n';
164 _out <<
"1 setlinejoin" <<
'\n';
169 _out << std::setprecision (5);
180 _out <<
"showpage" << std::endl;
210 for (
unsigned int v=1; v<nv-1; ++v)
241 libmesh_assert_equal_to (
side->type(),
EDGE3 );
267 libmesh_assert_equal_to (elem->
type(),
EDGE3);
271 float phys_coords[3] = {0., 0., 0.};
272 float bez_coords[3] = {0., 0., 0.};
274 for (
unsigned int i=0; i<2; ++i)
278 for (
unsigned int j=0; j<3; ++j)
280 phys_coords[j] =
static_cast<float> 286 for (
unsigned int j=0; j<3; ++j)
287 for (
unsigned int k=0; k<3; ++k)
291 for (
unsigned int j=0; j<3; ++j)
const MeshBase & mesh() const
void plot_linear_elem(const Elem *elem)
IntRange< unsigned short > side_index_range() const
void _compute_edge_bezier_coeffs(const Elem *elem)
const bool _is_parallel_format
The base class for all geometric element types.
virtual SimpleRange< element_iterator > active_element_ptr_range()=0
static const float _bezier_transform[3][3]
virtual std::unique_ptr< Elem > build_side_ptr(const unsigned int i, bool proxy=true)=0
PostscriptIO(const MeshBase &mesh)
std::vector< Point > _bezier_coeffs
std::ostringstream _cell_string
virtual unsigned int n_vertices() const =0
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Temporarily serializes a DistributedMesh for output.
virtual void write(const std::string &) override
void plot_quadratic_elem(const Elem *elem)
unsigned int mesh_dimension() const
virtual ElemType type() const =0
const Point & point(const unsigned int i) const