32 #ifndef MADNESS_MRA_FUNCPLOT_H__INCLUDED
33 #define MADNESS_MRA_FUNCPLOT_H__INCLUDED
56 initialize<double>(
"zoom",2,
"zoom into the simulation cell");
57 initialize<long>(
"npoints",151,
"number of plot points per dimension");
58 initialize<std::vector<double>>(
"origin",{},
"origin of the plot");
59 initialize<std::vector<std::string>>(
"plane",{
"x1",
"x2"},
"plot plane: x1, x2, .., x6");
80 double zoom()
const {
return get<double>(
"zoom");}
81 long npoints()
const {
return get<long>(
"npoints");}
83 template<std::
size_t NDIM>
85 auto origin_vec=get<std::vector<double>>(
"origin");
87 int missing=
NDIM-origin_vec.size();
88 for (
auto i=0; i<missing; ++i) origin_vec.push_back(0.0);
93 std::vector<std::string>
plane()
const {
return get<std::vector<std::string>>(
"plane");}
115 template <
typename T, std::
size_t NDIM>
116 void plotdx(
const Function<T,NDIM>&
f,
119 const std::vector<long>& npt = std::vector<long>(
NDIM,201L),
145 template<std::
size_t NDIM>
155 for(i = 0; i <
NDIM; ++i) {
156 cell(i, 0) = plotlo[i];
157 cell(i, 1) = plothi[i];
161 if(world.
rank() == 0) {
166 fprintf(
f,
"<VTKFile type=\"StructuredGrid\" version=\"0.1\"" \
167 " byte_order=\"LittleEndian\" compressor=\"" \
168 "vtkZLibDataCompressor\">\n");
169 fprintf(
f,
" <StructuredGrid WholeExtent=\"");
170 for(i = 0; i <
NDIM; ++i)
171 fprintf(
f,
"0 %ld ", npt[i]-1);
175 fprintf(
f,
" <Piece Extent=\"");
176 for(i = 0; i <
NDIM; ++i)
177 fprintf(
f,
"0 %ld ", npt[i]-1);
181 fprintf(
f,
" <Points>\n");
182 fprintf(
f,
" <DataArray NumberOfComponents=\"3\" " \
183 "type=\"Float32\" format=\"ascii\">\n");
186 for(i = 0; i <
NDIM; ++i) {
190 space[i] = (cell(i, 1) - cell(i, 0)) / (npt[i] - 1);
195 for(i = 0; i <
NDIM; ++i)
196 fprintf(
f,
"%f ", plotlo[i] + it[i]*space[i]);
202 fprintf(
f,
" </DataArray>\n");
203 fprintf(
f,
" </Points>\n");
204 fprintf(
f,
" <PointData>\n");
224 template<
typename T, std::
size_t NDIM>
228 bool binary =
false) {
237 template<
typename T, std::
size_t NDIM>
241 bool binary =
false,
bool plot_refine =
false) {
248 for(i = 0; i <
NDIM; ++i) {
249 cell(i, 0) = plotlo[i];
250 cell(i, 1) = plothi[i];
252 std::vector<long> numpt(
NDIM);
253 for(i = 0; i <
NDIM; ++i)
260 if(world.
rank() == 0) {
265 fprintf(
f,
" <DataArray Name=\"%s\" format=\"ascii\" " \
266 "type=\"Float32\" NumberOfComponents=\"1\">\n", fieldname);
270 Tensor<T> tmpr =
function.eval_cube(cell, numpt, plot_refine);
273 if(world.
rank() == 0) {
275 fprintf(
f,
"%.6e\n", tmpr(*it));
277 fprintf(
f,
" </DataArray>\n");
290 template<
typename T, std::
size_t NDIM>
295 bool plot_refine =
false) {
306 for(i = 0; i <
NDIM; ++i) {
307 cell(i, 0) = plotlo[i];
308 cell(i, 1) = plothi[i];
310 std::vector<long> numpt(
NDIM);
311 for(i = 0; i <
NDIM; ++i)
318 if(world.
rank() == 0) {
323 fprintf(
f,
" <DataArray Name=\"%s\" format=\"ascii\" " \
324 "type=\"Float32\" NumberOfComponents=\"2\">\n", fieldname);
332 if(world.
rank() == 0) {
334 fprintf(
f,
"%.6e %.6e\n",
real(tmpr(*it)),
imag(tmpr(*it)));
336 fprintf(
f,
" </DataArray>\n");
348 template<std::
size_t NDIM>
354 if(world.
rank() == 0) {
359 fprintf(
f,
" </PointData>\n");
360 fprintf(
f,
" <CellData>\n");
361 fprintf(
f,
" </CellData>\n");
362 fprintf(
f,
" </Piece>\n");
363 fprintf(
f,
" </StructuredGrid>\n");
364 fprintf(
f,
"</VTKFile>\n");
372 return (
a>>8) | (
a<<8);
381 template <
typename T>
385 const std::vector<long>& npt = std::vector<long>(3,201L))
394 if (world.
rank() == 0) {
397 fwrite((
void*) dims,
sizeof(
short), 3,
f);
399 Tensor<T> r =
function.eval_cube(cell, npt);
400 if (world.
rank() == 0) {
401 double rmax = r.
max();
402 double rmin = r.
min();
403 double rrange = rmax + rmin;
404 double rmean = rrange*0.5;
405 double fac = 65535.0/rrange;
407 printf(
"plot_povray: %s: min=%.2e(0.0) mean=%.2e(0.5) max=%.2e(1.0) range=%.2e\n",
410 std::vector<unsigned short>
d(npt[0]);
411 for (
unsigned int i2=0; i2<npt[2]; ++i2) {
412 for (
unsigned int i1=0; i1<npt[1]; ++i1) {
413 for (
unsigned int i0=0; i0<npt[0]; ++i0) {
414 d[i0] = (
unsigned short)(
htons_x((
unsigned short)(fac*(r(i0,i1,i2) - rmin))));
417 fwrite((
void*) &
d[0],
sizeof(
short), npt[0],
f);
430 fprintf(
f,
" %.14e",
v);
437 template <
typename opT, std::
size_t NDIM>
444 for (std::size_t i=0; i<
NDIM; ++i)
sum +=
h[i]*
h[i];
447 if (world.
rank() == 0) {
451 for (
int i=0; i<npt; ++i) {
453 fprintf(file,
"%.14e ", i*
sum);
466 template <
typename T, std::
size_t NDIM>
473 for (std::size_t i=0; i<
NDIM; ++i)
sum +=
h[i]*
h[i];
478 if (world.
rank() == 0) {
482 for (
int i=0; i<npt; ++i) {
484 fprintf(file,
"%.14e ", i*
sum);
496 template <
typename T,
typename U, std::
size_t NDIM>
503 for (std::size_t i=0; i<
NDIM; ++i)
sum +=
h[i]*
h[i];
509 if (world.
rank() == 0) {
513 for (
int i=0; i<npt; ++i) {
515 fprintf(file,
"%.14e ", i*
sum);
529 template <
typename T,
typename U,
typename V, std::
size_t NDIM>
536 for (std::size_t i=0; i<
NDIM; ++i)
sum +=
h[i]*
h[i];
543 if (world.
rank() == 0) {
547 for (
int i=0; i<npt; ++i) {
549 fprintf(file,
"%.14e ", i*
sum);
563 template <
typename T,
typename U,
typename V,
typename W, std::
size_t NDIM>
570 for (std::size_t i=0; i<
NDIM; ++i)
sum +=
h[i]*
h[i];
578 if (world.
rank() == 0) {
580 for (
int i=0; i<npt; ++i) {
582 fprintf(file,
"%.14e ", i*
sum);
594 template <
typename T, std::
size_t NDIM>
600 for (std::size_t i=0; i<
NDIM; ++i)
sum +=
h[i]*
h[i];
602 World& world = vf[0].world();
604 std::for_each(vf.begin(), vf.end(), [](
const Function<T,NDIM>&
f){f.reconstruct();});
605 if (world.
rank() == 0) {
609 for (
int i=0; i<npt; ++i) {
611 fprintf(file,
"%.14e ", i*
sum);
612 std::for_each(vf.begin(), vf.end(), [&](
const Function<T,NDIM>&
f){ plot_line_print_value(file, f.eval(r));});
620 template<
size_t NDIM>
622 const std::string
name) {
623 typedef std::vector<Function<double,NDIM> >
vecfuncT;
627 template<
size_t NDIM>
630 const std::string
name) {
631 typedef std::vector<Function<double,NDIM> >
vecfuncT;
638 template<
size_t NDIM>
641 const std::string
name) {
642 typedef std::vector<Function<double,NDIM> >
vecfuncT;
665 template<
size_t NDIM>
667 const std::string
name,
const std::string
inputfile=
"input") {
669 if (world.
size()>1)
return;
671 std::string c1=
"x1", c2=
"x2";
677 std::string output_type=
"gnuplot";
693 }
else if (s ==
"plane") {
695 }
else if (s ==
"zoom") {
697 }
else if (s ==
"output") {
699 }
else if (s ==
"points") {
701 }
else if (s ==
"origin") {
702 for (std::size_t i=0; i<NDIM; ++i) f >> origin[i];
706 print(
"can't locate plot in file="+
inputfile+
" -- using default values");
708 double scale=1.0/zoom;
736 if(world.
rank() == 0) {
743 for (
int i0=0; i0<npoints; i0++) {
744 for (
int i1=0; i1<npoints; i1++) {
746 coord[cc1]=
lo+origin[cc1]+i0*stepsize;
747 coord[cc2]=
lo+origin[cc2]+i1*stepsize;
752 fprintf(
f,
"%12.6f %12.6f",coord[cc1],coord[cc2]);
753 for (std::size_t ivec=0; ivec<vfunction.size(); ++ivec)
754 fprintf(
f,
" %12.20f",vfunction[ivec](coord));
759 if (output_type==
"gnuplot") fprintf(
f,
"\n");
784 template<
size_t NDIM>
788 if (world.
size()>1)
return;
790 auto plane=
param.plane();
791 std::string c1=plane[0];
792 std::string c2=plane[1];
793 auto npoints=
param.npoints();
797 std::string output_type=
"gnuplot";
799 auto plane2dim = [](std::string
c) {
800 if (
c==
"x1")
return 0;
801 else if (
c==
"x2")
return 1;
802 else if (
c==
"x3")
return 2;
803 else if (
c==
"x4")
return 3;
804 else if (
c==
"x5")
return 4;
805 else if (
c==
"x6")
return 5;
810 std::size_t cc1=plane2dim(c1);
811 std::size_t cc2=plane2dim(c2);
824 if(world.
rank() == 0) {
831 for (
int i0=0; i0<npoints; i0++) {
832 for (
int i1=0; i1<npoints; i1++) {
834 coord[cc1]=
lo+origin[cc1]+i0*stepsize;
835 coord[cc2]=
lo+origin[cc2]+i1*stepsize;
837 fprintf(
f,
"%12.6f %12.6f",coord[cc1],coord[cc2]);
838 for (std::size_t ivec=0; ivec<vfunction.size(); ++ivec)
839 fprintf(
f,
" %12.20f",vfunction[ivec](coord));
844 if (output_type==
"gnuplot") fprintf(
f,
"\n");
852 template<
size_t NDIM,
typename opT>
855 if (world.
size()>1)
return;
857 auto plane=
param.plane();
858 std::string c1=plane[0];
859 std::string c2=plane[1];
860 auto npoints=
param.npoints();
861 auto origin=
param.
template origin<NDIM>();
862 auto coord=
param.
template origin<NDIM>();
864 std::string output_type=
"gnuplot";
866 auto plane2dim = [](std::string
c) {
867 if (
c==
"x1")
return 0;
868 else if (
c==
"x2")
return 1;
869 else if (
c==
"x3")
return 2;
870 else if (
c==
"x4")
return 3;
871 else if (
c==
"x5")
return 4;
872 else if (
c==
"x6")
return 5;
877 std::size_t cc1=plane2dim(c1);
878 std::size_t cc2=plane2dim(c2);
891 if(world.
rank() == 0) {
898 for (
int i0=0; i0<npoints; i0++) {
899 for (
int i1=0; i1<npoints; i1++) {
901 coord[cc1]=
lo+origin[cc1]+i0*stepsize;
902 coord[cc2]=
lo+origin[cc2]+i1*stepsize;
907 fprintf(
f,
"%12.6f %12.6f",coord[cc1],coord[cc2]);
908 fprintf(
f,
" %12.20f\n",
op(coord));
912 if (output_type==
"gnuplot") fprintf(
f,
"\n");
921 template<
size_t NDIM>
924 std::vector<std::string> molecular_info=std::vector<std::string>(),
int npoints=100,
double zoom=1.0) {
926 if (world.
size()>1)
return;
929 if (molecular_info.size()==0)
930 molecular_info=std::vector<std::string>(1,
"0 0 0.0 0.0 0.0\n");
936 std::vector<int> npt(3,npoints);
939 cell.
scale(1.0/zoom);
940 double xlen=cell(0,1)-cell(0,0);
941 double ylen=cell(1,1)-cell(1,0);
942 double zlen=cell(2,1)-cell(2,0);
951 fprintf(file,
"cube file from MADNESS\n");
952 fprintf(file,
"comment line\n");
955 fprintf(file,
"%d %12.8f %12.8f %12.8f \n",
int(molecular_info.size()),
956 cell(0,0),cell(1,0),cell(2,0));
959 const auto xdelta = xlen/(npt[0]-1);
960 const auto ydelta = ylen/(npt[1]-1);
961 const auto zdelta = zlen/(npt[2]-1);
964 fprintf(file,
"%d %12.6f %12.6f %12.6f\n",npt[0],xdelta,0.0,0.0);
965 fprintf(file,
"%d %12.6f %12.6f %12.6f\n",npt[1],0.0,ydelta,0.0);
966 fprintf(file,
"%d %12.6f %12.6f %12.6f\n",npt[2],0.0,0.0,zdelta);
969 for (
const std::string& s : molecular_info) fprintf(file,
"%s",s.c_str());
973 long count_per_line = 0;
974 for (
int i = 0; i < npt[0]; ++i) {
975 for (
int j = 0; j < npt[1]; ++j) {
976 for (
int k = 0;
k < npt[2]; ++
k) {
977 double x = cell(0, 0) + origin[0] + xdelta * i;
978 double y = cell(1, 0) + origin[1] + ydelta * j;
979 double z = cell(2, 0) + origin[2] + zdelta *
k;
982 if (count_per_line < 6) {
983 fprintf(file,
"%12.5e ",
f(x, y, z));
986 fprintf(file,
"%12.5e\n",
f(x, y, z));
996 template<
size_t NDIM>
1000 if (world.
size() > 1)
1004 std::ofstream os(
filename.c_str());
1008 for (
int xyz = 0; xyz != 3; ++xyz) {
1009 os <<
"[" << cell(xyz, 0) <<
"," << cell(xyz, 1) <<
"]";
1016 f.print_tree_json(os);
1021 template<
size_t NDIM>
1023 if(vf.empty())
return;
1024 World& world=vf.front().world();
1025 for(
size_t i=0;i<vf.size();++i){
1026 const std::string namei=
name+
"_"+std::to_string(i);
1028 plot_plane<NDIM>(world,vf[i],namei);
1033 template<
typename T>
1035 std::ostringstream o;
1046 template<
size_t NDIM>
1063 const double maxrank=40.0;
1064 double hue=0.7-(0.7/maxrank)*(rank);
1071 fprintf(
f,
"\\newhsbcolor{mycolor}{%8.4f 1.0 0.7}\n",color);
1072 fprintf(
f,
"\\psdot[linecolor=mycolor](%12.8f,%12.8f)\n",x,y);
1078 double phi=ipt*stepsize;
1082 coord[0]=radius * sin(phi);
1083 coord[1]=radius * cos(phi);
1096 coord[0]=radius * sin(phi);
1097 coord[1]=radius * cos(phi);
1116 trajectory(
double radius,
long npt) : radius(radius), npt(npt), curve(this->circle2) {
1120 trajectory(
double radius,
coord_3d el2,
long npt) : radius(radius), npt(npt), el2(el2), curve(this->circle_6d) {
1125 const coordT step=(hi-
lo)*(1.0/npt);
1152 return curve(start,end,radius,el2,npt,ipt);
1160 template<
size_t NDIM>
1163 const int npt=traj.
npt;
1165 const bool psdot=
false;
1167 if(world.
rank() == 0) {
1173 fprintf(
f,
"\\psset{xunit=0.1cm}\n");
1174 fprintf(
f,
"\\psset{yunit=10cm}\n");
1175 fprintf(
f,
"\\begin{pspicture}(0,-0.3)(100,1.0)\n");
1176 fprintf(
f,
"\\pslinewidth=0.05pt\n");
1180 for (
int ipt=0; ipt<npt; ipt++) {
1183 long rank=
function.evalR(coord);
1186 fprintf(
f,
"%4i %12.6f\n",ipt,
function(coord));
1191 if (psdot) fprintf(
f,
"\\end{pspicture}\n");
1201 template<
size_t NDIM>
1204 const int npt=traj.
npt;
1206 const bool psdot=
false;
1208 if(world.
rank() == 0) {
1213 fprintf(
f,
"\\psset{xunit=0.05cm}\n");
1214 fprintf(
f,
"\\psset{yunit=100cm}\n");
1215 fprintf(
f,
"\\begin{pspicture}(0,0.25)(100,0.3)\n");
1216 fprintf(
f,
"\\pslinewidth=0.005pt\n");
1221 for (
int ipt=0; ipt<npt; ipt++) {
1230 fprintf(
f,
"%4i %12.6f\n",ipt, ff(coord));
1235 if (psdot) fprintf(
f,
"\\end{pspicture}\n");
std::complex< double > double_complex
Definition: cfft.h:14
FunctionDefaults holds default paramaters as static class members.
Definition: funcdefaults.h:204
static const Tensor< double > & get_cell()
Gets the user cell for the simulation.
Definition: funcdefaults.h:446
static const Tensor< double > & get_cell_width()
Returns the width of each user cell dimension.
Definition: funcdefaults.h:468
A multiresolution adaptive numerical function.
Definition: mra.h:122
Definition: indexit.h:180
class for holding the parameters for calculation
Definition: QCCalculationParametersBase.h:290
virtual void read_input_and_commandline_options(World &world, const commandlineparser &parser, const std::string tag)
Definition: QCCalculationParametersBase.h:325
void set_user_defined_value(const std::string &key, const T &value)
Definition: QCCalculationParametersBase.h:533
T max(long *ind=0) const
Return the maximum value (and if ind is non-null, its index) in the Tensor.
Definition: tensor.h:1703
T min(long *ind=0) const
Return the minimum value (and if ind is non-null, its index) in the Tensor.
Definition: tensor.h:1683
IsSupported< TensorTypeData< Q >, Tensor< T > & >::type scale(Q x)
Inplace multiplication by scalar of supported type (legacy name)
Definition: tensor.h:686
void fence(bool debug=false)
Synchronizes all processes in communicator AND globally ensures no pending AM or tasks.
Definition: worldgop.cc:161
void barrier()
Synchronizes all processes in communicator ... does NOT fence pending AM or tasks.
Definition: worldgop.h:700
A parallel world class.
Definition: world.h:132
ProcessID rank() const
Returns the process rank in this World (same as MPI_Comm_rank()).
Definition: world.h:318
ProcessID size() const
Returns the number of processes in this World (same as MPI_Comm_size()).
Definition: world.h:328
WorldGopInterface & gop
Global operations.
Definition: world.h:205
Defines common mathematical and physical constants.
static double lo
Definition: dirac-hatom.cc:23
auto T(World &world, response_space &f) -> response_space
Definition: global_functions.cc:34
Tensor< typename Tensor< T >::scalar_type > arg(const Tensor< T > &t)
Return a new tensor holding the argument of each element of t (complex types only)
Definition: tensor.h:2502
static const double v
Definition: hatom_sf_dirac.cc:20
Tensor< double > op(const Tensor< double > &x)
Definition: kain.cc:508
#define max(a, b)
Definition: lda.h:51
#define MADNESS_EXCEPTION(msg, value)
Macro for throwing a MADNESS exception.
Definition: madness_exception.h:119
#define MADNESS_ASSERT(condition)
Assert a condition that should be free of side-effects since in release builds this might be a no-op.
Definition: madness_exception.h:134
const double pi
Mathematical constant .
Definition: constants.h:48
unsigned short htons_x(unsigned short a)
Definition: funcplot.h:371
File holds all helper structures necessary for the CC_Operator and CC2 class.
Definition: DFParameters.h:10
static const char * filename
Definition: legendre.cc:96
static std::string stringify(T arg)
Definition: funcplot.h:1034
Vector< double, 3 > coordT
Definition: corepotential.cc:54
response_space scale(response_space a, double b)
std::enable_if< NDIM==3, void >::type plot_cubefile(World &world, const Function< double, NDIM > &f, std::string filename, std::vector< std::string > molecular_info=std::vector< std::string >(), int npoints=100, double zoom=1.0)
Definition: funcplot.h:923
void plot_along(World &world, trajectory< NDIM > traj, const Function< double, NDIM > &function, std::string filename)
Definition: funcplot.h:1161
Function< T, NDIM > copy(const Function< T, NDIM > &f, const std::shared_ptr< WorldDCPmapInterface< Key< NDIM > > > &pmap, bool fence=true)
Create a new copy of the function with different distribution and optional fence.
Definition: mra.h:2002
void plotvtk_data(const T &function, const char *fieldname, World &world, const char *filename, const Vector< double, NDIM > &plotlo, const Vector< double, NDIM > &plothi, const Vector< long, NDIM > &npt, bool binary=false)
Definition: funcplot.h:225
Vector< double, 6 > coord_6d
Definition: funcplot.h:1043
void plotdx(const Function< T, NDIM > &f, const char *filename, const Tensor< double > &cell=FunctionDefaults< NDIM >::get_cell(), const std::vector< long > &npt=std::vector< long >(NDIM, 201L), bool binary=true)
Writes an OpenDX format file with a cube/slice of points on a uniform grid.
Definition: mraimpl.h:3448
void plot(const std::vector< Function< double, NDIM > > &vf, const std::string &name, const std::vector< std::string > &header)
convenience to get plot_plane and plot_cubefile
Definition: funcplot.h:1022
static void plot_line_print_value(FILE *f, double_complex v)
Definition: funcplot.h:425
void plot_plane(World &world, const Function< double, NDIM > &function, const std::string name)
Definition: funcplot.h:621
std::enable_if< NDIM==3, void >::type print_tree_jsonfile(World &world, const Function< double, NDIM > &f, std::string filename)
Definition: funcplot.h:998
void print(const T &t, const Ts &... ts)
Print items to std::cout (items separated by spaces) and terminate with a new line.
Definition: print.h:225
Function< T, NDIM > sum(World &world, const std::vector< Function< T, NDIM > > &f, bool fence=true)
Returns new function — q = sum_i f[i].
Definition: vmra.h:1421
NDIM & f
Definition: mra.h:2416
NDIM const Function< R, NDIM > & g
Definition: mra.h:2416
static void plotpovray(const Function< T, 3 > &function, const char *filename, const Tensor< double > &cell=FunctionDefaults< 3 >::get_cell(), const std::vector< long > &npt=std::vector< long >(3, 201L))
Writes a Povray DF3 format file with a cube of points on a uniform grid.
Definition: funcplot.h:382
double imag(double x)
Definition: complexfun.h:56
std::istream & position_stream_to_word(std::istream &f, const std::string &tag, const char comment='#', bool rewind=true, bool silent=false)
position the input stream to tag, which must be a word (not part of a word)
Definition: position_stream.cc:56
std::string type(const PairType &n)
Definition: PNOParameters.h:18
vector< functionT > vecfuncT
Definition: corepotential.cc:58
void plotvtk_begin(World &world, const char *filename, const Vector< double, NDIM > &plotlo, const Vector< double, NDIM > &plothi, const Vector< long, NDIM > &npt, bool binary=false)
Definition: funcplot.h:146
void plotvtk_end(World &world, const char *filename, bool binary=false)
Definition: funcplot.h:349
Vector< double, 3 > coord_3d
Definition: funcplot.h:1042
void plot_line(World &world, const char *filename, int npt, const Vector< double, NDIM > &lo, const Vector< double, NDIM > &hi, const opT &op)
Generates ASCII file tabulating f(r) at npoints along line r=lo,...,hi.
Definition: funcplot.h:438
double real(double x)
Definition: complexfun.h:52
std::string name(const FuncType &type, const int ex=-1)
Definition: ccpairfunction.h:28
static const double b
Definition: nonlinschro.cc:119
static const double a
Definition: nonlinschro.cc:118
static const double c
Definition: relops.cc:10
static const double L
Definition: rk.cc:46
static const long k
Definition: rk.cc:44
Definition: funcplot.h:48
Vector< double, NDIM > origin() const
Definition: funcplot.h:84
PlotParameters & set_npoints(const long n)
Definition: funcplot.h:66
PlotParameters()
Definition: funcplot.h:53
long npoints() const
Definition: funcplot.h:81
PlotParameters & set_origin(const std::vector< double > origin)
Definition: funcplot.h:74
double zoom() const
Definition: funcplot.h:80
PlotParameters(World &world, const commandlineparser parser=commandlineparser(), const std::string tag="plot")
Definition: funcplot.h:49
PlotParameters & set_zoom(const double z)
Definition: funcplot.h:62
std::vector< std::string > plane() const
Definition: funcplot.h:93
PlotParameters & set_plane(const std::vector< std::string > plane)
Definition: funcplot.h:70
very simple command line parser
Definition: commandlineparser.h:15
Definition: funcplot.h:1047
long npt
Definition: funcplot.h:1054
static coord_6d circle_6d(const coord_6d &lo, const coord_6d &hi, double radius, coord_3d el2, long npt, long ipt)
Definition: funcplot.h:1088
double lo
Definition: funcplot.h:1051
static Vector< double, NDIM > line_internal(const coordT &lo, const coordT &hi, double radius, coord_3d el2, long npt, long ipt)
Definition: funcplot.h:1124
static trajectory line_xyz(const int xyz, const long npt)
EZ ctor for a line a direction xyz={0,1,2,..,NDIM-1} thru the origin.
Definition: funcplot.h:1143
static trajectory line2(const coordT start, const coordT end, const long npt)
constructor for a line
Definition: funcplot.h:1133
trajectory(double radius, coord_3d el2, long npt)
Definition: funcplot.h:1120
Vector< double, NDIM > operator()(int ipt)
Definition: funcplot.h:1151
coordT end
Definition: funcplot.h:1055
double radius
Definition: funcplot.h:1053
coordT start
Definition: funcplot.h:1055
static void print_psdot(FILE *f, double x, double y, double color)
Definition: funcplot.h:1070
static coord_3d circle2(double lo, double hi, double radius, coord_3d el2, long npt, long ipt)
Definition: funcplot.h:1076
trajectory(double radius, long npt)
Definition: funcplot.h:1116
trajectory()
Definition: funcplot.h:1110
double hi
Definition: funcplot.h:1052
Vector< double, NDIM > coordT
Definition: funcplot.h:1049
coord_3d el2
Definition: funcplot.h:1056
static double hueCode(const int rank)
some tools for plotting MRA ranks of low order tensors
Definition: funcplot.h:1062
coordT(* curve)(const coordT &lo, const coordT &hi, double radius, coord_3d el2, long npt, long ipt)
Definition: funcplot.h:1057
InputParameters param
Definition: tdse.cc:203
void d()
Definition: test_sig.cc:79
double h(const coord_1d &r)
Definition: testgconv.cc:68
static const std::size_t NDIM
Definition: testpdiff.cc:42
#define PROFILE_FUNC
Definition: worldprofile.h:209