Peano 4
Loading...
Searching...
No Matches
convert.cpp File Reference
#include <iostream>
#include <fstream>
#include <vector>
#include <string>
#include <limits>
#include "config.h"
#include "output/VTUWriter.h"
#include "output/PeanoWriter.h"
#include "input/PeanoTextPatchFileReader.h"
#include "filter/Copy.h"
#include "filter/Intersection.h"
#include "filter/SelectValue.h"
#include "filter/SeparateResolutions.h"
#include "filter/ConvertTreeIdIntoDataField.h"
#include "tarch/Assertions.h"
#include "tarch/logging/ChromeTraceFileLogger.h"
#include "tarch/mpi/Rank.h"
#include <filesystem>
Include dependency graph for convert.cpp:

Go to the source code of this file.

Enumerations

enum class  Filter {
  Copy , ExtractFineGrid , SelectValue , SeparateResolutions ,
  PlotDomainDecomposition
}
 

Functions

void createDirectory (const std::string &directory)
 
void inspect (std::string filename)
 
std::string getFileNameWithoutExtensionAndWithoutPatch (std::string &file)
 
void convertFile (const std::string &outputDirectory, const std::string &truncatedFile, const std::string &format, convert::data::Variable variable, const convert::data::DataSet &data)
 
void convertFile (std::string filename, const std::string &outputDirectory, const std::string &selector, const std::string &format)
 
std::string toString (Filter filter)
 
void applyFilter (std::string filename, std::string outputDirectory, std::string selector, std::string filterName, std::string targetSelector)
 
int main (int argc, char *argv[])
 

Variables

const std::string OutputFormatPeano = "peano"
 
const std::string OutputFormatVTU = "vtu"
 

Enumeration Type Documentation

◆ Filter

enum class Filter
strong
Enumerator
Copy 
ExtractFineGrid 
SelectValue 
SeparateResolutions 
PlotDomainDecomposition 

Definition at line 161 of file convert.cpp.

Function Documentation

◆ applyFilter()

void applyFilter ( std::string filename,
std::string outputDirectory,
std::string selector,
std::string filterName,
std::string targetSelector )

Definition at line 187 of file convert.cpp.

References _log, Copy, createDirectory(), ExtractFineGrid, getFileNameWithoutExtensionAndWithoutPatch(), convert::filter::Intersection::KeepFinerGrid, logDebug, logError, logInfo, PlotDomainDecomposition, SelectValue, SeparateResolutions, and toString().

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ convertFile() [1/2]

void convertFile ( const std::string & outputDirectory,
const std::string & truncatedFile,
const std::string & format,
convert::data::Variable variable,
const convert::data::DataSet & data )

Definition at line 92 of file convert.cpp.

References _log, logError, convert::data::Variable::name, OutputFormatPeano, and OutputFormatVTU.

Referenced by convertFile(), and main().

Here is the caller graph for this function:

◆ convertFile() [2/2]

void convertFile ( std::string filename,
const std::string & outputDirectory,
const std::string & selector,
const std::string & format )

Definition at line 115 of file convert.cpp.

References _log, convertFile(), createDirectory(), getFileNameWithoutExtensionAndWithoutPatch(), logDebug, and logError.

Here is the call graph for this function:

◆ createDirectory()

void createDirectory ( const std::string & directory)

Definition at line 34 of file convert.cpp.

References _log, tarch::mpi::Rank::abort(), logError, and logInfo.

Referenced by applyFilter(), and convertFile().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getFileNameWithoutExtensionAndWithoutPatch()

std::string getFileNameWithoutExtensionAndWithoutPatch ( std::string & file)

Definition at line 76 of file convert.cpp.

References _log, and logDebug.

Referenced by applyFilter(), and convertFile().

Here is the caller graph for this function:

◆ inspect()

void inspect ( std::string filename)

Definition at line 54 of file convert.cpp.

References _log, convert::data::Cell_Values, and logInfo.

Referenced by main().

Here is the caller graph for this function:

◆ main()

◆ toString()

std::string toString ( Filter filter)

Definition at line 170 of file convert.cpp.

References Copy, ExtractFineGrid, PlotDomainDecomposition, SelectValue, and SeparateResolutions.

Referenced by exahype2::RefinementControl::addCommand(), toolbox::particles::assignmentchecks::internal::Database::addEvent(), tarch::internal::allocateRawData(), applyFilter(), peano4::stacks::STDVectorStackOverSmartPointers< T >::clone(), toolbox::loadbalancing::AbstractLoadBalancing::enable(), toolbox::particles::ensureAllParticleListsAreGatheredOrEmpty(), peano4::stacks::STDVectorStackOverSmartPointers< T >::gather(), peano4::parallel::Node::getGridDataExchangeMetaInformation(), peano4::datamanagement::CellMarker::getInvokingParentCellsCentre(), peano4::datamanagement::VertexMarker::getInvokingParentCellsCentre(), toolbox::loadbalancing::CostMetrics::getLightestRank(), peano4::datamanagement::FaceMarker::getRelativePositionWithinFatherCell(), peano4::datamanagement::FaceMarker::getRelativePositionWithinFatherCell(), toolbox::loadbalancing::AbstractLoadBalancing::isEnabled(), main(), main(), exahype2::enumerator::FaceAoSLexicographicEnumerator::operator()(), toolbox::particles::assignmentchecks::internal::ParticleIdentifier::operator<(), operator<<(), peano4::stacks::STDVectorOverContainerOfPointers< T >::prepareMetaDataToSendOut(), applications::exahype2::ccz4::RKDGCCZ4::refinementCriterion(), runParallel(), runParallel(), peano4::datamanagement::VertexMarker::select(), selectNextAlgorithmicStep(), tarch::la::slice(), examples::exahype2::loh1::AbstractLOH1OnGPU::startGridInitialisationStep(), peano4::stacks::STDVectorStackOverSmartPointers< T >::startReceive(), peano4::stacks::STDVectorOverContainerOfPointers< T >::startSend(), examples::exahype2::loh1::AbstractLOH1::startTimeStep(), examples::exahype2::loh1::AbstractLOH1OnGPU::startTimeStep(), peano4::parallel::tests::PingPongTest::testDaStGenArray(), peano4::SplitInstruction::toString(), peano4::stacks::STDVectorStackOverSmartPointers< T >::toString(), toolbox::loadbalancing::AbstractLoadBalancing::toString(), toolbox::particles::assignmentchecks::internal::ParticleIdentifier::toString(), toolbox::loadbalancing::strategies::RecursiveBipartition::toString(), toolbox::loadbalancing::strategies::SplitOversizedTree::toString(), peano4::stacks::STDVectorOverContainerOfPointers< T >::tryToFinishSendOrReceive(), peano4::stacks::STDVectorStackOverSmartPointers< T >::tryToFinishSendOrReceive(), toolbox::loadbalancing::strategies::RecursiveBipartition::updateLoadBalancing(), toolbox::loadbalancing::strategies::SplitOversizedTree::updateLoadBalancing(), toolbox::loadbalancing::strategies::SpreadOut::updateLoadBalancing(), toolbox::loadbalancing::strategies::SpreadOutHierarchically::updateLoadBalancing(), toolbox::loadbalancing::strategies::SpreadOutOnceGridStagnates::updateLoadBalancing(), toolbox::loadbalancing::strategies::RecursiveBipartition::updateState(), toolbox::loadbalancing::strategies::SplitOversizedTree::updateState(), toolbox::loadbalancing::strategies::SpreadOutHierarchically::updateState(), and peano4::stacks::STDVectorOverContainerOfPointers< T >::workInReceivedMetaData().

Variable Documentation

◆ OutputFormatPeano

const std::string OutputFormatPeano = "peano"

Definition at line 30 of file convert.cpp.

Referenced by convertFile(), and main().

◆ OutputFormatVTU

const std::string OutputFormatVTU = "vtu"

Definition at line 31 of file convert.cpp.

Referenced by convertFile(), and main().