Carmen Code
 All Classes Files Functions Variables Macros Pages
Functions
ViewEvery.cpp File Reference

Print solution every PrintEvery iteration. More...

#include "Carmen.h"
Include dependency graph for ViewEvery.cpp:

Functions

void ViewEvery (Node *Root, int arg)
 Writes into file the data of the tree structure at iteration arg. The output file names are AverageNNN.dat and MeshNNN.dat, NNN being the iteration in an accurate format. The root node is Root. Only for multiresolution computations. More...
 
void ViewEvery (FineMesh *Root, int arg)
 Same as previous for a fine mesh Root. Only for finite volume computations. More...
 

Detailed Description

Print solution every PrintEvery iteration.

Function Documentation

void ViewEvery ( Node Root,
int  arg 
)

Writes into file the data of the tree structure at iteration arg. The output file names are AverageNNN.dat and MeshNNN.dat, NNN being the iteration in an accurate format. The root node is Root. Only for multiresolution computations.

Parameters
RootRoot node
argArgument
Returns
void
33 {
34  char AverageName[256]; // File name for AverageNNN.dat
35  char MeshName[256]; // File name for MeshNNN.dat
36  char AverageFormat[256]; // File format for AverageNNN.dat
37  char MeshFormat[256]; // File format for MeshNNN.dat
38 
39  sprintf(AverageFormat, "Average%s0%ii.vtk", "%", DigitNumber(IterationNb));
40  sprintf(AverageName, AverageFormat, arg);
41  sprintf(MeshFormat, "Mesh%s0%ii.dat", "%", DigitNumber(IterationNb));
42  sprintf(MeshName, MeshFormat,arg);
43 
44  View(Root, "Tree.dat", MeshName, AverageName);
45 }
int IterationNb
Definition: Parameters.cpp:37
int DigitNumber(int arg)
Returns the number of digits of the integer arg.
Definition: DigitNumber.cpp:22
void View(FineMesh *Root, const char *AverageFileName)
Writes the current cel–averages of the fine mesh Root into file AverageFileName. Only for finite volu...
Definition: View.cpp:87
void ViewEvery ( FineMesh Root,
int  arg 
)

Same as previous for a fine mesh Root. Only for finite volume computations.

Parameters
RootFine mesh
argargument
Returns
void
54 {
55  char AverageName[256]; // File name for AverageNNN.dat
56  char AverageFormat[256]; // File format for AverageNNN.dat
57 
58  sprintf(AverageFormat, "Average%s0%ii.vtk", "%", DigitNumber(IterationNb));
59  sprintf(AverageName, AverageFormat, arg);
60 
61  View(Root, AverageName);
62 }
int IterationNb
Definition: Parameters.cpp:37
int DigitNumber(int arg)
Returns the number of digits of the integer arg.
Definition: DigitNumber.cpp:22
void View(FineMesh *Root, const char *AverageFileName)
Writes the current cel–averages of the fine mesh Root into file AverageFileName. Only for finite volu...
Definition: View.cpp:87

Here is the caller graph for this function: