waLBerla 7.3
Loading...
Searching...
No Matches
AccuracyEvaluationLinePlot.h File Reference

Detailed Description

#include "core/DataTypes.h"
#include "core/Set.h"
#include "core/debug/CheckFunctions.h"
#include "core/logging/Logging.h"
#include "core/math/Vector3.h"
#include "core/mpi/MPIManager.h"
#include "core/mpi/Gatherv.h"
#include "core/mpi/Reduce.h"
#include "core/uid/SUID.h"
#include "domain_decomposition/StructuredBlockStorage.h"
#include "field/EvaluationFilter.h"
#include "field/iterators/IteratorMacros.h"
#include <algorithm>
#include <cstdlib>
#include <fstream>
#include <string>
#include <string_view>
#include <type_traits>

Classes

struct  walberla::field::internal::AccuracyEvaluationPlotData< T >
struct  walberla::field::internal::AccuracyEvaluationPlotDataSorter< T >
class  walberla::field::AccuracyEvaluationLinePlot< Field_T, SolutionFunction_T, Filter_T >
 Class for plotting simulation (and solution) values along a line through the domain. More...
class  walberla::field::AccuracyEvaluationLinePlotter< AccuracyEvaluationLinePlot_T >
 Class for plotting simulation (and solution) values along a line through the domain. More...

Namespaces

namespace  walberla
 Storage for detected contacts which can be used to perform actions for all contacts, e.g.
namespace  walberla::field
namespace  walberla::field::internal

Macros

#define WALBERLA_FIELD_MAKE_ACCURACY_EVALUATION_LINE_PLOT_CONFIG_PARSER(config)
#define WALBERLA_FIELD_MAKE_ACCURACY_EVALUATION_LINE_PLOT_SET_AND_RETURN()

Functions

template<typename T>
void walberla::field::internal::accuracyEvaluationLinePlotIO (std::ofstream &file, const std::vector< AccuracyEvaluationPlotData< T > > &points)
template<>
void walberla::field::internal::accuracyEvaluationLinePlotIO (std::ofstream &file, const std::vector< AccuracyEvaluationPlotData< Vector3< real_t > > > &points)
template<typename Field_T, typename SolutionFunction_T>
shared_ptr< AccuracyEvaluationLinePlot< Field_T, SolutionFunction_T > > walberla::field::makeAccuracyEvaluationLinePlot (const weak_ptr< StructuredBlockStorage > &blocks, const ConstBlockDataID &fieldId, const SolutionFunction_T &solution, const bool yAxis=true, const Set< SUID > &requiredSelectors=Set< SUID >::emptySet(), const Set< SUID > &incompatibleSelectors=Set< SUID >::emptySet())
template<typename Field_T, typename FlagField_T, typename SolutionFunction_T>
shared_ptr< AccuracyEvaluationLinePlot< Field_T, SolutionFunction_T, FlagFieldEvaluationFilter< FlagField_T > > > walberla::field::makeAccuracyEvaluationLinePlot (const weak_ptr< StructuredBlockStorage > &blocks, const ConstBlockDataID &fieldId, const ConstBlockDataID &flagFieldId, const Set< FlagUID > &cellsToEvaluate, const SolutionFunction_T &solution, const bool yAxis=true, const Set< SUID > &requiredSelectors=Set< SUID >::emptySet(), const Set< SUID > &incompatibleSelectors=Set< SUID >::emptySet())
template<typename Field_T, typename Filter_T, typename SolutionFunction_T>
shared_ptr< AccuracyEvaluationLinePlot< Field_T, SolutionFunction_T, Filter_T > > walberla::field::makeAccuracyEvaluationLinePlot (const weak_ptr< StructuredBlockStorage > &blocks, const ConstBlockDataID &fieldId, const SolutionFunction_T &solution, const Filter_T &filter, const bool yAxis=true, const Set< SUID > &requiredSelectors=Set< SUID >::emptySet(), const Set< SUID > &incompatibleSelectors=Set< SUID >::emptySet())
void walberla::field::internal::accuracyEvaluationLinePlotConfigParser (const Config::BlockHandle &parentBlockHandle, const std::string &configBlockName, bool &defaultYAxis, Vector3< real_t > &defaultRelLinePoint, real_t &defaultNormalizationFactor, math::AABB &defaultDomainNormalization)
void walberla::field::internal::accuracyEvaluationLinePlotConfigParser (const shared_ptr< Config > &config, const std::string &configBlockName, bool &defaultYAxis, Vector3< real_t > &defaultRelLinePoint, real_t &defaultNormalizationFactor, math::AABB &defaultDomainNormalization)
template<typename Field_T, typename SolutionFunction_T, typename Config_T>
shared_ptr< AccuracyEvaluationLinePlot< Field_T, SolutionFunction_T > > walberla::field::makeAccuracyEvaluationLinePlot (const Config_T &config, const weak_ptr< StructuredBlockStorage > &blocks, const ConstBlockDataID &fieldId, const SolutionFunction_T &solution, const std::string &configBlockName=std::string(internal::accuracyEvaluationLinePlotConfigBlock), const Set< SUID > &requiredSelectors=Set< SUID >::emptySet(), const Set< SUID > &incompatibleSelectors=Set< SUID >::emptySet())
template<typename Field_T, typename FlagField_T, typename SolutionFunction_T, typename Config_T>
shared_ptr< AccuracyEvaluationLinePlot< Field_T, SolutionFunction_T, FlagFieldEvaluationFilter< FlagField_T > > > walberla::field::makeAccuracyEvaluationLinePlot (const Config_T &config, const weak_ptr< StructuredBlockStorage > &blocks, const ConstBlockDataID &fieldId, const ConstBlockDataID &flagFieldId, const Set< FlagUID > &cellsToEvaluate, const SolutionFunction_T &solution, const std::string &configBlockName=std::string(internal::accuracyEvaluationLinePlotConfigBlock), const Set< SUID > &requiredSelectors=Set< SUID >::emptySet(), const Set< SUID > &incompatibleSelectors=Set< SUID >::emptySet())
template<typename Field_T, typename Filter_T, typename SolutionFunction_T, typename Config_T>
shared_ptr< AccuracyEvaluationLinePlot< Field_T, SolutionFunction_T, Filter_T > > walberla::field::makeAccuracyEvaluationLinePlot (const Config_T &config, const weak_ptr< StructuredBlockStorage > &blocks, const ConstBlockDataID &fieldId, const SolutionFunction_T &solution, const Filter_T &filter, const std::string &configBlockName=std::string(internal::accuracyEvaluationLinePlotConfigBlock), const Set< SUID > &requiredSelectors=Set< SUID >::emptySet(), const Set< SUID > &incompatibleSelectors=Set< SUID >::emptySet())
template<typename AccuracyEvaluationLinePlot_T>
shared_ptr< AccuracyEvaluationLinePlotter< AccuracyEvaluationLinePlot_T > > walberla::field::makeAccuracyEvaluationLinePlotter (const shared_ptr< AccuracyEvaluationLinePlot_T > &plot, const uint_t evaluationFrequency, const std::string &filename=std::string(internal::accuracyEvaluationLinePlotterFilename), const std::string &fileExtension=std::string(internal::accuracyEvaluationLinePlotterExtension))
void walberla::field::internal::accuracyEvaluationLinePlotterConfigParser (const Config::BlockHandle &parentBlockHandle, const std::string &configBlockName, uint_t &defaultEvaluationFrequency, std::string &defaultFilename, std::string &defaultFileExtension)
void walberla::field::internal::accuracyEvaluationLinePlotterConfigParser (const shared_ptr< Config > &config, const std::string &configBlockName, uint_t &defaultEvaluationFrequency, std::string &defaultFilename, std::string &defaultFileExtension)
template<typename Config_T, typename AccuracyEvaluationLinePlot_T>
shared_ptr< AccuracyEvaluationLinePlotter< AccuracyEvaluationLinePlot_T > > walberla::field::makeAccuracyEvaluationLinePlotter (const Config_T &config, const shared_ptr< AccuracyEvaluationLinePlot_T > &plot, const std::string &configBlockName=std::string(internal::accuracyEvaluationLinePlotterConfigBlock))

Variables

constexpr std::string_view walberla::field::internal::accuracyEvaluationLinePlotConfigBlock = "AccuracyEvaluationLinePlot"
constexpr std::string_view walberla::field::internal::accuracyEvaluationLinePlotterFilename = "linePlot"
constexpr std::string_view walberla::field::internal::accuracyEvaluationLinePlotterExtension = "dat"
constexpr std::string_view walberla::field::internal::accuracyEvaluationLinePlotterConfigBlock = "AccuracyEvaluationLinePlotter"

Macro Definition Documentation

◆ WALBERLA_FIELD_MAKE_ACCURACY_EVALUATION_LINE_PLOT_CONFIG_PARSER

#define WALBERLA_FIELD_MAKE_ACCURACY_EVALUATION_LINE_PLOT_CONFIG_PARSER ( config)
Value:
bool defaultYAxis( true ); \
Vector3<real_t> defaultRelLinePoint( real_c(0.5) ); \
real_t defaultNormalizationFactor( 1_r ); \
auto _blocks = blocks.lock(); \
WALBERLA_CHECK_NOT_NULLPTR( _blocks, "Trying to execute 'makeAccuracyEvaluationLinePlot' for a block storage object that doesn't exist anymore" ); \
math::AABB defaultDomainNormalization( _blocks->getDomain() ); \
internal::accuracyEvaluationLinePlotConfigParser( config, configBlockName, defaultYAxis, defaultRelLinePoint, defaultNormalizationFactor, defaultDomainNormalization );

◆ WALBERLA_FIELD_MAKE_ACCURACY_EVALUATION_LINE_PLOT_SET_AND_RETURN

#define WALBERLA_FIELD_MAKE_ACCURACY_EVALUATION_LINE_PLOT_SET_AND_RETURN ( )
Value:
evaluation->setLinePoint( defaultRelLinePoint ); \
evaluation->setNormalizationFactor( defaultNormalizationFactor ); \
evaluation->setDomainNormalization( defaultDomainNormalization ); \
return evaluation;