--- Begin Message ---
------------------------------------------------------------
revno: 5087
committer: Garth N. Wells <gnw20@xxxxxxxxx>
branch nick: dolfin-all
timestamp: Thu 2010-08-26 21:18:16 +0100
message:
Remove Octave file.
removed:
dolfin/io/OctaveFile.cpp
dolfin/io/OctaveFile.h
modified:
dolfin/io/File.cpp
dolfin/io/RAWFile.h
--
lp:dolfin
https://code.launchpad.net/~dolfin-core/dolfin/main
Your team DOLFIN Core Team is subscribed to branch lp:dolfin.
To unsubscribe from this branch go to https://code.launchpad.net/~dolfin-core/dolfin/main/+edit-subscription
=== modified file 'dolfin/io/File.cpp'
--- dolfin/io/File.cpp 2010-08-17 09:43:44 +0000
+++ dolfin/io/File.cpp 2010-08-26 20:18:16 +0000
@@ -19,7 +19,6 @@
#include "File.h"
#include "XMLFile.h"
#include "MatlabFile.h"
-#include "OctaveFile.h"
#include "PythonFile.h"
#include "VTKFile.h"
#include "RAWFile.h"
@@ -55,8 +54,6 @@
}
else if (extension == ".xml")
file.reset(new XMLFile(filename, false));
- else if (extension == ".m")
- file.reset(new OctaveFile(filename));
else if (extension == ".py")
file.reset(new PythonFile(filename));
else if (extension == ".pvd")
@@ -81,9 +78,6 @@
case matlab:
file.reset(new MatlabFile(filename));
break;
- case octave:
- file.reset(new OctaveFile(filename));
- break;
case python:
file.reset(new PythonFile(filename));
break;
=== removed file 'dolfin/io/OctaveFile.cpp'
--- dolfin/io/OctaveFile.cpp 2010-04-05 17:22:50 +0000
+++ dolfin/io/OctaveFile.cpp 1970-01-01 00:00:00 +0000
@@ -1,63 +0,0 @@
-// Copyright (C) 2003-2006 Johan Hoffman and Anders Logg.
-// Licensed under the GNU LGPL Version 2.1.
-//
-// Modified by Erik Svensson, 2003.
-// Modified by Garth N. Wells, 2006.
-//
-// First added: 2003-02-26
-// Last changed: 2010-04-05
-
-// FIXME: Use streams rather than stdio
-#include <stdio.h>
-
-#include <dolfin/log/dolfin_log.h>
-#include <dolfin/la/GenericVector.h>
-#include <dolfin/la/GenericMatrix.h>
-#include "MatlabFile.h"
-#include "OctaveFile.h"
-
-using namespace dolfin;
-
-//-----------------------------------------------------------------------------
-OctaveFile::OctaveFile(const std::string filename) : MFile(filename)
-{
- type = "Octave";
-}
-//-----------------------------------------------------------------------------
-OctaveFile::~OctaveFile()
-{
- // Do nothing
-}
-//-----------------------------------------------------------------------------
-void OctaveFile::operator<<(const GenericMatrix& A)
-{
- // Octave file format for Matrix is not the same as the Matlab format,
- // since octave cannot handle sparse matrices.
-
- uint M = A.size(0);
- uint N = A.size(1);
- double* row = new double[N];
-
- FILE *fp = fopen(filename.c_str(), "a");
- if (!fp)
- error("Unable to open file %s", filename.c_str());
- fprintf(fp, "A = zeros(%u, %u);\n", M, N);
-
- for (uint i = 0; i < M; i++)
- {
- // Get nonzero entries
- std::vector<uint> columns;
- std::vector<double> values;
- A.getrow(i, columns, values);
-
- // Write nonzero entries
- for (uint pos = 0; pos < columns.size(); pos++)
- fprintf(fp, "A(%d, %d) = %.16e;\n", (int)i + 1, columns[pos] + 1, values[pos]);
- }
-
- fclose(fp);
- delete [] row;
-
- info(TRACE, "Saved matrix to file %s in Octave format.", filename.c_str());
-}
-//-----------------------------------------------------------------------------
=== removed file 'dolfin/io/OctaveFile.h'
--- dolfin/io/OctaveFile.h 2009-04-27 13:01:54 +0000
+++ dolfin/io/OctaveFile.h 1970-01-01 00:00:00 +0000
@@ -1,34 +0,0 @@
-// Copyright (C) 2003-2006 Johan Hoffman and Anders Logg.
-// Licensed under the GNU LGPL Version 2.1.
-//
-// First added: 2003-07-15
-// Last changed: 2005-05-07
-
-#ifndef __OCTAVE_FILE_H
-#define __OCTAVE_FILE_H
-
-#include <dolfin/common/types.h>
-#include <dolfin/la/Matrix.h>
-#include "MFile.h"
-
-namespace dolfin
-{
-
- class OctaveFile : public MFile
- {
- public:
-
- OctaveFile(const std::string filename);
- ~OctaveFile();
-
- // Input
-
- // Output
-
- void operator<< (const GenericMatrix& A);
-
- };
-
-}
-
-#endif
=== modified file 'dolfin/io/RAWFile.h'
--- dolfin/io/RAWFile.h 2009-08-11 20:16:27 +0000
+++ dolfin/io/RAWFile.h 2010-08-26 20:18:16 +0000
@@ -24,15 +24,16 @@
/// A Xd3d format for instance
RAWFile(const std::string filename);
+
~RAWFile();
-
void operator<< (const MeshFunction<int>& meshfunction);
void operator<< (const MeshFunction<unsigned int>& meshfunction);
void operator<< (const MeshFunction<double>& meshfunction);
void operator<< (const Function& u);
private:
+
void ResultsWrite(const Function& u) const;
void rawNameUpdate(const int counter);
--- End Message ---