Reference documentation for deal.II version 9.1.1
\(\newcommand{\dealcoloneq}{\mathrel{\vcenter{:}}=}\)
Public Member Functions | Private Member Functions | Private Attributes | List of all members
MeshWorker::Assembler::GnuplotPatch Class Reference

#include <deal.II/meshworker/output.h>

Public Member Functions

 GnuplotPatch ()
 
void initialize (const unsigned int n_points, const unsigned int n_vectors)
 
void initialize_stream (std::ostream &stream)
 
template<int dim>
void initialize_info (DoFInfo< dim > &info, bool face)
 
template<int dim>
void assemble (const DoFInfo< dim > &info)
 
template<int dim>
void assemble (const DoFInfo< dim > &info1, const DoFInfo< dim > &info2)
 

Private Member Functions

template<typename T >
void write (const T &t) const
 
void write_endl () const
 

Private Attributes

unsigned int n_vectors
 
unsigned int n_points
 
std::ostream * os
 

Detailed Description

A class that, instead of assembling into a matrix or vector, outputs the results on a cell to a gnuplot patch.

This assembler expects that LocalResults contains quadrature values set with LocalResults::quadrature_value(). When it is initialized with the number of quadrature points in a single (!) space direction and the number of data fields to be displayed, it initializes LocalResults automatically. The number of data fields in local results will be increased by dim in order to accommodate for the coordinates of the data points.

While data slots for the space coordinates are allocated automatically, these coordinates are not entered. It is up to the user to enter the coordinates in the first dim data entries at every point. This adds the flexibility to output transformed coordinates or even something completely different.

Note
In the current implementation, only cell data can be written.
Author
Guido Kanschat
Date
2011, 2012

Definition at line 58 of file output.h.

Constructor & Destructor Documentation

◆ GnuplotPatch()

MeshWorker::Assembler::GnuplotPatch::GnuplotPatch ( )
inline

Constructor.

Definition at line 165 of file output.h.

Member Function Documentation

◆ initialize()

void MeshWorker::Assembler::GnuplotPatch::initialize ( const unsigned int  n_points,
const unsigned int  n_vectors 
)
inline

Initialize for writing n data vectors. The number of points is the number of quadrature points in a single direction in a tensor product formula. It must match the number in the actual Quadrature used to create the patches. The total number of data vectors produced is n+dim and the first dim should be the space coordinates of the points. Nevertheless, it is up to the user to set these values to whatever is desired.

Definition at line 173 of file output.h.

◆ initialize_stream()

void MeshWorker::Assembler::GnuplotPatch::initialize_stream ( std::ostream &  stream)
inline

Set the stream os to which data is written. If no stream is selected with this function, data goes to deallog.

Definition at line 181 of file output.h.

◆ initialize_info()

template<int dim>
void MeshWorker::Assembler::GnuplotPatch::initialize_info ( DoFInfo< dim > &  info,
bool  face 
)
inline

Initialize the local data in the DoFInfo object used later for assembling.

The info object refers to a cell if !face, or else to an interior or boundary face.

Definition at line 189 of file output.h.

◆ assemble() [1/2]

template<int dim>
void MeshWorker::Assembler::GnuplotPatch::assemble ( const DoFInfo< dim > &  info)
inline

Write the patch to the output stream.

Definition at line 202 of file output.h.

◆ assemble() [2/2]

template<int dim>
void MeshWorker::Assembler::GnuplotPatch::assemble ( const DoFInfo< dim > &  info1,
const DoFInfo< dim > &  info2 
)
inline
Warning
Not implemented yet

Definition at line 238 of file output.h.

◆ write()

template<typename T >
void MeshWorker::Assembler::GnuplotPatch::write ( const T &  t) const
inlineprivate

Write the object T either to the stream os, if initialize_stream() has been called, or to deallog if no pointer has been set.

Definition at line 146 of file output.h.

◆ write_endl()

void MeshWorker::Assembler::GnuplotPatch::write_endl ( ) const
inlineprivate

Write an end-of-line marker either to the stream os, if initialize_stream has been called, or to deallog if no pointer has been set.

Definition at line 156 of file output.h.

Member Data Documentation

◆ n_vectors

unsigned int MeshWorker::Assembler::GnuplotPatch::n_vectors
private

The number of output components in each point.

Definition at line 130 of file output.h.

◆ n_points

unsigned int MeshWorker::Assembler::GnuplotPatch::n_points
private

The number of points in one direction.

Definition at line 134 of file output.h.

◆ os

std::ostream* MeshWorker::Assembler::GnuplotPatch::os
private

Stream to which output is to be written. Set by initialize_stream().

Definition at line 139 of file output.h.


The documentation for this class was generated from the following file: