DiFfRG
Loading...
Searching...
No Matches
DiFfRG::FEOutput< dim, VectorType > Class Template Reference

A class to output finite element data to disk as .vtu files and .pvd time series. More...

#include <fe_output.hh>

Public Member Functions

 FEOutput (std::string top_folder, std::string output_name, std::string output_folder, const JSONValue &json)
 Construct a new FEOutput object.
 
 FEOutput ()
 
 ~FEOutput ()
 
void attach (const DoFHandler< dim > &dof_handler, const VectorType &solution, const std::string &name)
 Attach a solution to the output.
 
void attach (const DoFHandler< dim > &dof_handler, const VectorType &solution, const std::vector< std::string > &names)
 Attach a solution to the output.
 
void flush (double time)
 Flush all attached solutions to disk.
 

Private Attributes

const std::string top_folder
 
const std::string output_name
 
const std::string output_folder
 
DataOut< safe_dimdata_out
 
uint series_number
 
uint subdivisions
 
std::vector< std::pair< double, std::string > > time_series
 
std::thread output_thread
 
std::vector< typename VectorMemory< VectorType >::Pointer > attached_solutions
 
GrowingVectorMemory< VectorType > mem
 

Static Private Attributes

static constexpr uint safe_dim = dim == 0 ? 1 : dim
 

Detailed Description

template<uint dim, typename VectorType>
class DiFfRG::FEOutput< dim, VectorType >

A class to output finite element data to disk as .vtu files and .pvd time series.

Template Parameters
dimDimension of the problem
VectorTypeType of the vector

Constructor & Destructor Documentation

◆ FEOutput() [1/2]

template<uint dim, typename VectorType >
DiFfRG::FEOutput< dim, VectorType >::FEOutput ( std::string top_folder,
std::string output_name,
std::string output_folder,
const JSONValue & json )

Construct a new FEOutput object.

Parameters
dof_handlerDoFHandler associated with the solution
top_folderFolder where the output will be written, i.e. the folder containing the .pvd file.
output_nameName of the output, i.e. the name of the .pvd file.
output_folderFolder where the .vtu files will be saved. Should be relative to top_folder.
subdivisionsNumber of subdivisions of the cells in the .vtu files.

◆ FEOutput() [2/2]

template<uint dim, typename VectorType >
DiFfRG::FEOutput< dim, VectorType >::FEOutput ( )

◆ ~FEOutput()

template<uint dim, typename VectorType >
DiFfRG::FEOutput< dim, VectorType >::~FEOutput ( )

Member Function Documentation

◆ attach() [1/2]

template<uint dim, typename VectorType >
void DiFfRG::FEOutput< dim, VectorType >::attach ( const DoFHandler< dim > & dof_handler,
const VectorType & solution,
const std::string & name )

Attach a solution to the output.

Parameters
dof_handlerThe DoFHandler associated with the solution.
solutionThe solution to attach.
nameThe name of the solution.

◆ attach() [2/2]

template<uint dim, typename VectorType >
void DiFfRG::FEOutput< dim, VectorType >::attach ( const DoFHandler< dim > & dof_handler,
const VectorType & solution,
const std::vector< std::string > & names )

Attach a solution to the output.

Parameters
dof_handlerThe DoFHandler associated with the solution.
solutionThe solution to attach.
namesThe names of each component of the solution.

◆ flush()

template<uint dim, typename VectorType >
void DiFfRG::FEOutput< dim, VectorType >::flush ( double time)

Flush all attached solutions to disk.

Parameters
timeThe time tag to attach to the solution.

Member Data Documentation

◆ attached_solutions

template<uint dim, typename VectorType >
std::vector<typename VectorMemory<VectorType>::Pointer> DiFfRG::FEOutput< dim, VectorType >::attached_solutions
private

◆ data_out

template<uint dim, typename VectorType >
DataOut<safe_dim> DiFfRG::FEOutput< dim, VectorType >::data_out
private

◆ mem

template<uint dim, typename VectorType >
GrowingVectorMemory<VectorType> DiFfRG::FEOutput< dim, VectorType >::mem
private

◆ output_folder

template<uint dim, typename VectorType >
const std::string DiFfRG::FEOutput< dim, VectorType >::output_folder
private

◆ output_name

template<uint dim, typename VectorType >
const std::string DiFfRG::FEOutput< dim, VectorType >::output_name
private

◆ output_thread

template<uint dim, typename VectorType >
std::thread DiFfRG::FEOutput< dim, VectorType >::output_thread
private

◆ safe_dim

template<uint dim, typename VectorType >
uint DiFfRG::FEOutput< dim, VectorType >::safe_dim = dim == 0 ? 1 : dim
staticconstexprprivate

◆ series_number

template<uint dim, typename VectorType >
uint DiFfRG::FEOutput< dim, VectorType >::series_number
private

◆ subdivisions

template<uint dim, typename VectorType >
uint DiFfRG::FEOutput< dim, VectorType >::subdivisions
private

◆ time_series

template<uint dim, typename VectorType >
std::vector<std::pair<double, std::string> > DiFfRG::FEOutput< dim, VectorType >::time_series
private

◆ top_folder

template<uint dim, typename VectorType >
const std::string DiFfRG::FEOutput< dim, VectorType >::top_folder
private

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