Skip to content
Snippets Groups Projects
Commit 4b5b668d authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

immer noch absurde 270-er non-Kommentare aus dualplot l. 435.

Versuch mit %14.7g
parent 23b618ee
No related branches found
No related tags found
No related merge requests found
......@@ -469,8 +469,8 @@ double myeval( double x, void* data )
namespace NCurveFile
{
void IntegrateFile(
const COlc *fin, const int k, const string mode,
const int ip, const string name );
const COlc *fin, const int k, const string& mode,
const int ip, const string& name, const CCoord& ico );
double NumericIntegral(
const COlc *fc, const CCurve *c, const int k, const int j,
const double low, const double hig );
......@@ -540,10 +540,12 @@ void NCurveFile::Integrate(void)
CList parsel( mode, CLimits( 0, fin->nPar()-1 ) );
for( uint iv=0; iv<parsel.n(); ++iv ){
int ip = parsel.V[iv];
IntegrateFile( fin, fiter.SelNo(), "p", ip, "p"+strg(ip) );
IntegrateFile( fin, fiter.SelNo(),
"p", ip, "p"+strg(ip), fin->PCo[ip] );
}
} else // other integrals
IntegrateFile( fin, fiter.SelNo(), mode, -1, mode );
IntegrateFile( fin, fiter.SelNo(), mode, -1, mode,
CCoord( "mode", "" ) );
}
}
......@@ -551,8 +553,8 @@ void NCurveFile::Integrate(void)
//! Extract exactly one integral from each curve of fin.
void NCurveFile::IntegrateFile( const COlc *fin, const int k,
const string mode, const int ip,
const string name )
const string& mode, const int ip,
const string& name, const CCoord& ico )
{
COld fout;
CScan S;
......@@ -566,7 +568,9 @@ void NCurveFile::IntegrateFile( const COlc *fin, const int k,
fout.name.replace( 0, 4, "" );
fout.name.insert( 0, name + "_" );
fout.xco = fin->ZCo.back();
fout.yco = fin->PCo[ip];
fout.yco = ico;
if( fout.ZCo.size()<1 )
throw string( "input has no z coord" );
fout.ZCo.pop_back();
S.Clear();
S.z = fin->VC[0].z;
......
......@@ -432,7 +432,7 @@ void NPlot::Line(const int lstyle,
ps_accu.push_back( outlin );
for (uint i=0; i<np; i++) {
snprintf( outlin, LINSIZ,
"%7.3f%7.3f%7.3f t%c %% %12.6g wx %12.6g wy\n",
"%7.3f%7.3f%7.3f t%c %% %14.7g wx %14.7g wy\n",
X.pc(xp[i]), Y.pc(yp[i]), 0.0,
i==0 ? 'i' : i==np-1 ? 'f' : ' ',
xp[i], yp[i]);
......
......@@ -85,6 +85,16 @@ void COlo::SaveHeader_a01(FILE *fd)
//***************************************************************************//
COld::COld( class COlc const* c )
{
name = c->name;
lDoc = c->lDoc;
xco = c->xco;
yco = c->yco;
ZCo = c->ZCo;
RPar = c->RPar;
}
//! Save bulk of online file in one of several formats.
void COld::SaveBody( FILE *fd, string fmt )
......
......@@ -18,7 +18,7 @@ class COlo { // on-line object (virtual base class for COld, COlc)
vector<CParam> RPar;
bool as_on_disk;
virtual inline ~COlo(void) { }; // magic: makes dynamic_cast possible
virtual inline ~COlo(void) {}; // magic: makes dynamic_cast possible
inline uint nZ(void) const { return ZCo.size(); };
......@@ -30,9 +30,8 @@ class COld : public COlo { // on-line data file
public:
vector<CScan> VS;
inline COld(void) { };
COld( class COlc const* c ) {};
//COld(CCoord CX, CCoord CY, CGrid VX, vector<double> VY);
inline COld(void) {};
COld( class COlc const* c );
inline uint nScan(void) const { return VS.size(); };
uint nPts(uint j) const;
......@@ -65,7 +64,7 @@ class CEle {
void* Ptr;
public:
inline CEle(void) { };
inline CEle(void) {};
inline CEle(COld* pin) {
Typ = DATA;
Ptr = (void*) pin;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment