Commit 5ffa6e41 authored by Tomáš Oberhuber's avatar Tomáš Oberhuber
Browse files

Implementing vector field Gnuplot writer.

parent 9907cc47
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -87,6 +87,7 @@ class VectorField< Size, MeshFunction< Mesh, MeshEntityDimensions, Real > >
      typedef SharedPointer< FunctionType > FunctionPointer;
      typedef typename MeshType::DeviceType DeviceType;
      typedef typename MeshType::IndexType IndexType;
      typedef VectorField< Size, MeshFunction< Mesh, MeshEntityDimensions, Real > > ThisType;

      static void configSetup( Config::ConfigDescription& config,
                               const String& prefix = "" )
+9 −9
Original line number Diff line number Diff line
@@ -58,7 +58,7 @@ class VectorFieldGnuplotWriter< VectorField< VectorFieldSize, MeshFunction< Mesh
   public:
      typedef Meshes::Grid< 1, MeshReal, Device, MeshIndex > MeshType;
      typedef Real RealType;
      typedef Functions::VectorField< VectorFieldSize, MeshFunction< MeshType, 0, RealType > VectorFieldType;
      typedef Functions::VectorField< VectorFieldSize, MeshFunction< MeshType, 0, RealType > > VectorFieldType;

      static bool write( const VectorFieldType& function,
                         std::ostream& str );
@@ -111,12 +111,12 @@ template< typename MeshReal,
          typename MeshIndex,
          typename Real,
          int VectorFieldSize >
class VectorFieldGnuplotWriter< VectorField< Meshes::Grid< 2, MeshReal, Device, MeshIndex >, 0, Real > > >
class VectorFieldGnuplotWriter< VectorField< VectorFieldSize, MeshFunction< Meshes::Grid< 2, MeshReal, Device, MeshIndex >, 0, Real > > >
{
   public:
      typedef Meshes::Grid< 2, MeshReal, Device, MeshIndex > MeshType;
      typedef Real RealType;
      typedef Functions::VectorField< MeshType, 0, RealType > > VectorFieldType;
      typedef Functions::VectorField< VectorFieldSize, MeshFunction< MeshType, 0, RealType > > VectorFieldType;

      static bool write( const VectorFieldType& function,
                         std::ostream& str );
@@ -131,12 +131,12 @@ template< typename MeshReal,
          typename MeshIndex,
          typename Real,
          int VectorFieldSize >
class VectorFieldGnuplotWriter< VectorField< Meshes::Grid< 3, MeshReal, Device, MeshIndex >, 3, Real > > >
class VectorFieldGnuplotWriter< VectorField< VectorFieldSize, MeshFunction< Meshes::Grid< 3, MeshReal, Device, MeshIndex >, 3, Real > > >
{
   public:
      typedef Meshes::Grid< 3, MeshReal, Device, MeshIndex > MeshType;
      typedef Real RealType;
      typedef Functions::VectorField< MeshType, 3, RealType > > VectorFieldType;
      typedef Functions::VectorField< VectorFieldSize, MeshFunction< MeshType, 3, RealType > > VectorFieldType;

      static bool write( const VectorFieldType& function,
                         std::ostream& str );
@@ -150,12 +150,12 @@ template< typename MeshReal,
          typename MeshIndex,
          typename Real,
          int VectorFieldSize >
class VectorFieldGnuplotWriter< VectorField< Meshes::Grid< 3, MeshReal, Device, MeshIndex >, 2, Real > > >
class VectorFieldGnuplotWriter< VectorField< VectorFieldSize, MeshFunction< Meshes::Grid< 3, MeshReal, Device, MeshIndex >, 2, Real > > >
{
   public:
      typedef Meshes::Grid< 3, MeshReal, Device, MeshIndex > MeshType;
      typedef Real RealType;
      typedef Functions::VectorField< MeshType, 2, RealType > > VectorFieldType;
      typedef Functions::VectorField< VectorFieldSize, MeshFunction< MeshType, 2, RealType > > VectorFieldType;

      static bool write( const VectorFieldType& function,
                         std::ostream& str );
@@ -169,12 +169,12 @@ template< typename MeshReal,
          typename MeshIndex,
          typename Real,
          int VectorFieldSize >
class VectorFieldGnuplotWriter< VectorField< Meshes::Grid< 3, MeshReal, Device, MeshIndex >, 0, Real > > >
class VectorFieldGnuplotWriter< VectorField< VectorFieldSize, MeshFunction< Meshes::Grid< 3, MeshReal, Device, MeshIndex >, 0, Real > > >
{
   public:
      typedef Meshes::Grid< 3, MeshReal, Device, MeshIndex > MeshType;
      typedef Real RealType;
      typedef Functions::VectorField< MeshType, 0, RealType > > VectorFieldType;
      typedef Functions::VectorField< VectorFieldSize, MeshFunction< MeshType, 0, RealType > > VectorFieldType;

      static bool write( const VectorFieldType& function,
                         std::ostream& str );
+25 −16
Original line number Diff line number Diff line
@@ -10,6 +10,7 @@

#pragma once

#include <iostream>
#include <TNL/Functions/VectorFieldGnuplotWriter.h>

namespace TNL {
@@ -31,9 +32,10 @@ write( const VectorField& function,
template< typename MeshReal,
          typename Device,
          typename MeshIndex,
          typename Real >
          typename Real,
          int VectorFieldSize >
bool
VectorFieldGnuplotWriter< VectorField< Meshes::Grid< 1, MeshReal, Device, MeshIndex >, 1, Real > >::
VectorFieldGnuplotWriter< VectorField< VectorFieldSize, MeshFunction< Meshes::Grid< 1, MeshReal, Device, MeshIndex >, 1, Real > > >::
write( const VectorFieldType& function,
       std::ostream& str )
{
@@ -57,9 +59,10 @@ write( const VectorFieldType& function,
template< typename MeshReal,
          typename Device,
          typename MeshIndex,
          typename Real >
          typename Real,
          int VectorFieldSize >
bool
VectorFieldGnuplotWriter< VectorField< Meshes::Grid< 1, MeshReal, Device, MeshIndex >, 0, Real > >::
VectorFieldGnuplotWriter< VectorField< VectorFieldSize, MeshFunction< Meshes::Grid< 1, MeshReal, Device, MeshIndex >, 0, Real > > >::
write( const VectorFieldType& function,
       std::ostream& str )
{
@@ -84,9 +87,10 @@ write( const VectorFieldType& function,
template< typename MeshReal,
          typename Device,
          typename MeshIndex,
          typename Real >
          typename Real,
          int VectorFieldSize >
bool
VectorFieldGnuplotWriter< VectorField< Meshes::Grid< 2, MeshReal, Device, MeshIndex >, 2, Real > >::
VectorFieldGnuplotWriter< VectorField< VectorFieldSize, MeshFunction< Meshes::Grid< 2, MeshReal, Device, MeshIndex >, 2, Real > > >::
write( const VectorFieldType& function,
       std::ostream& str )
{
@@ -116,9 +120,10 @@ write( const VectorFieldType& function,
template< typename MeshReal,
          typename Device,
          typename MeshIndex,
          typename Real >
          typename Real,
          int VectorFieldSize >
bool
VectorFieldGnuplotWriter< VectorField< Meshes::Grid< 2, MeshReal, Device, MeshIndex >, 1, Real > >::
VectorFieldGnuplotWriter< VectorField< VectorFieldSize, MeshFunction< Meshes::Grid< 2, MeshReal, Device, MeshIndex >, 1, Real > > >::
write( const VectorFieldType& function,
       std::ostream& str )
{
@@ -172,9 +177,10 @@ write( const VectorFieldType& function,
template< typename MeshReal,
          typename Device,
          typename MeshIndex,
          typename Real >
          typename Real,
          int VectorFieldSize >
bool
VectorFieldGnuplotWriter< VectorField< Meshes::Grid< 2, MeshReal, Device, MeshIndex >, 0, Real > >::
VectorFieldGnuplotWriter< VectorField< VectorFieldSize, MeshFunction< Meshes::Grid< 2, MeshReal, Device, MeshIndex >, 0, Real > > >::
write( const VectorFieldType& function,
       std::ostream& str )
{
@@ -205,9 +211,10 @@ write( const VectorFieldType& function,
template< typename MeshReal,
          typename Device,
          typename MeshIndex,
          typename Real >
          typename Real,
          int VectorFieldSize >
bool
VectorFieldGnuplotWriter< VectorField< Meshes::Grid< 3, MeshReal, Device, MeshIndex >, 3, Real > >::
VectorFieldGnuplotWriter< VectorField< VectorFieldSize, MeshFunction< Meshes::Grid< 3, MeshReal, Device, MeshIndex >, 3, Real > > >::
write( const VectorFieldType& function,
       std::ostream& str )
{
@@ -240,9 +247,10 @@ write( const VectorFieldType& function,
template< typename MeshReal,
          typename Device,
          typename MeshIndex,
          typename Real >
          typename Real,
          int VectorFieldSize >
bool
VectorFieldGnuplotWriter< VectorField< Meshes::Grid< 3, MeshReal, Device, MeshIndex >, 2, Real > >::
VectorFieldGnuplotWriter< VectorField< VectorFieldSize, MeshFunction< Meshes::Grid< 3, MeshReal, Device, MeshIndex >, 2, Real > > >::
write( const VectorFieldType& function,
       std::ostream& str )
{
@@ -320,9 +328,10 @@ write( const VectorFieldType& function,
template< typename MeshReal,
          typename Device,
          typename MeshIndex,
          typename Real >
          typename Real,
          int VectorFieldSize >
bool
VectorFieldGnuplotWriter< VectorField< Meshes::Grid< 3, MeshReal, Device, MeshIndex >, 0, Real > >::
VectorFieldGnuplotWriter< VectorField< VectorFieldSize, MeshFunction< Meshes::Grid< 3, MeshReal, Device, MeshIndex >, 0, Real > > >::
write( const VectorFieldType& function,
       std::ostream& str )
{