*
* To be filled in.
* precision=5; viewpoint=gnuplot default; no border
- *
+ * shade or not; grid or not; grid shaded; data vector
*
* \subsection{GMV format}
*
*/
struct EpsFlags
{
+ /**
+ * This denotes the number of the
+ * data vector which shall be used
+ * for generating the height
+ * information. By default, the
+ * first data vector is taken,
+ * i.e. #height_value==0#, if
+ * there is any data vector. If there
+ * is no data vector, no height
+ * information is generated.
+ */
+ unsigned int height_vector;
+
/**
* Enum denoting the possibilities
* whether the scaling should be done
* Default is #1.0#.
*/
double z_scaling;
-
+
+ /**
+ * Flag the determines whether the
+ * lines bounding the cells (or the
+ * parts of each patch) are to be
+ * plotted.
+ *
+ * Default: #true#.
+ bool draw_mesh;
+
/**
* Constructor.
*/
- EpsFlags (const SizeType size_type = width,
+ EpsFlags (const unsigned int height_vector = 0,
+ const SizeType size_type = width,
const unsigned int size = 300,
const double line_width = 0.5,
const double azimut_angle = 60,
const double turn_angle = 30,
- const double z_scaling = 1.0);
+ const double z_scaling = 1.0,
+ const bool draw_mesh = true);
};
/**
int, int,
<< "The number of points in this data set is " << arg1
<< ", but we expected " << arg2 << " in each space direction.");
-
+ /**
+ * Exception
+ */
+ DeclException2 (ExcInvalidHeightVectorNumber,
+ int, int,
+ << "The number " << arg1 << " of the vector to be used for "
+ << "height information is invalid, since there are only "
+ << arg2 << " data sets.");
/**
* Exception
*/
{};
-DataOutBase::EpsFlags::EpsFlags (const SizeType size_type,
+DataOutBase::EpsFlags::EpsFlags (const unsigned int height_vector,
+ const SizeType size_type,
const unsigned int size,
const double line_width,
const double azimut_angle,
const double turn_angle,
- const double z_scaling) :
+ const double z_scaling,
+ const bool draw_mesh) :
+ height_vector(height_vector),
size_type(size_type),
size(size),
line_width(line_width),
azimut_angle(azimut_angle),
turn_angle(turn_angle),
- z_scaling(z_scaling)
+ z_scaling(z_scaling),
+ draw_mesh(draw_mesh)
{};
((patch->vertices[2] * x_frac) +
(patch->vertices[3] * (1-x_frac))) * y_frac1)
};
-
+
+ Assert ((flags.height_vector < patch->data.m()) ||
+ patch->data.m() == 0,
+ ExcInvalidHeightVectorNumber (flags.height_vector,
+ patch->data.m()));
const double heights[4]
- = { patch->data(0,i*(n_subdivisions+1) + j) * flags.z_scaling,
- patch->data(0,(i+1)*(n_subdivisions+1) + j) * flags.z_scaling,
- patch->data(0,(i+1)*(n_subdivisions+1) + j+1) * flags.z_scaling,
- patch->data(0,i*(n_subdivisions+1) + j+1) * flags.z_scaling};
+ = { patch->data.m() != 0 ?
+ patch->data(flags.height_vector,i*(n_subdivisions+1) + j) * flags.z_scaling : 0,
+
+ patch->data.m() != 0 ?
+ patch->data(flags.height_vector,(i+1)*(n_subdivisions+1) + j) * flags.z_scaling : 0,
+
+ patch->data.m() != 0 ?
+ patch->data(flags.height_vector,(i+1)*(n_subdivisions+1) + j+1) * flags.z_scaling : 0,
+
+ patch->data.m() != 0 ?
+ patch->data(flags.height_vector,i*(n_subdivisions+1) + j+1) * flags.z_scaling : 0};
// now compute the projection of
<< (cell->vertices[2]-offset) * scale << " l "
<< (cell->vertices[3]-offset) * scale << " lf"
<< endl;
-
- out << "0 sg "
- << (cell->vertices[0]-offset) * scale << " m "
- << (cell->vertices[1]-offset) * scale << " l "
- << (cell->vertices[2]-offset) * scale << " l "
- << (cell->vertices[3]-offset) * scale << " lx"
- << endl;
+
+ if (flags.draw_mesh)
+ out << "0 sg "
+ << (cell->vertices[0]-offset) * scale << " m "
+ << (cell->vertices[1]-offset) * scale << " l "
+ << (cell->vertices[2]-offset) * scale << " l "
+ << (cell->vertices[3]-offset) * scale << " lx"
+ << endl;
};
out << "showpage" << endl;