MADNESS 0.10.1
funcdefaults.h
Go to the documentation of this file.
1/*
2 This file is part of MADNESS.
3
4 Copyright (C) 2007,2010 Oak Ridge National Laboratory
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19
20 For more information please contact:
21
22 Robert J. Harrison
23 Oak Ridge National Laboratory
24 One Bethel Valley Road
25 P.O. Box 2008, MS-6367
26
27 email: harrisonrj@ornl.gov
28 tel: 865-241-3937
29 fax: 865-572-0680
30*/
31
32#ifndef MADNESS_MRA_FUNCDEFAULTS_H__INCLUDED
33#define MADNESS_MRA_FUNCDEFAULTS_H__INCLUDED
34
35
36/// \file funcdefaults.h
37/// \brief Provides FunctionDefaults and utilities for coordinate transformation
38/// \ingroup mrabcext
39
45#include <madness/mra/bc.h>
46#include <madness/mra/key.h>
47
48#include <optional>
49
50namespace madness {
51 template <typename T, std::size_t NDIM> class FunctionImpl;
52
53 /// The maximum wavelet order presently supported
54 static const int MAXK = 30;
55
56 /// The maximum depth of refinement possible
57 static const int MAXLEVEL = 8*sizeof(Translation)-2;
58
59 enum TreeState {
60 reconstructed, ///< s coeffs at the leaves only
61 compressed, ///< d coeffs in internal nodes, s and d coeffs at the root, empty leaves may be present
62 nonstandard, ///< s and d coeffs in internal nodes
63 nonstandard_with_leaves, ///< like nonstandard, with s coeffs at the leaves
64 nonstandard_after_apply, ///< s and d coeffs, state after operator application
65 redundant, ///< s coeffs everywhere
66 redundant_after_merge, ///< s coeffs everywhere, must be summed up to yield the result
67 on_demand, ///< no coeffs anywhere, but a functor providing if necessary
69 };
70
71 template<std::size_t NDIM=1>
72 std::ostream& operator<<(std::ostream& os, const TreeState treestate) {
73 if (treestate==reconstructed) os << "reconstructed";
74 else if (treestate==compressed) os << "compressed";
75 else if (treestate==nonstandard) os << "nonstandard";
76 else if (treestate==nonstandard_with_leaves) os << "nonstandard_with_leaves";
77 else if (treestate==nonstandard_after_apply) os << "nonstandard_after_apply";
78 else if (treestate==redundant) os << "redundant";
79 else if (treestate==redundant_after_merge) os << "redundant_after_merge";
80 else if (treestate==on_demand) os << "on_demand";
81 else if (treestate==unknown) os << "unknown";
82 else {
83 MADNESS_EXCEPTION("unknown treestate",1);
84 }
85 return os;
86 }
87
88 /// FunctionDefaults holds default paramaters as static class members
89
90 /// Declared and initialized in mra.cc and/or funcimpl::initialize.
91 ///
92 /// Currently all functions of the same dimension share the same cell dimensions
93 /// since they are stored inside FunctionDefaults ... if you change the
94 /// cell dimensions *all* functions of that dimension are affected.
95 ///
96 /// N.B. Ultimately, we may need to make these defaults specific to each
97 /// world, as should be all global state.
98 /// \ingroup mra
99 template <std::size_t NDIM>
101 MADNESS_PRAGMA_CLANG(diagnostic push)
102 MADNESS_PRAGMA_CLANG(diagnostic ignored "-Wundefined-var-template")
103
104 private:
105 static int k; ///< Wavelet order
106 static double thresh; ///< Truncation threshold
107 static int initial_level; ///< Initial level for fine scale projection
108 static int special_level; ///< Minimum level for fine scale projection of special boxes
109 static int max_refine_level; ///< Level at which to stop refinement
110 static int truncate_mode; ///< Truncation method
111 static bool refine; ///< Whether to refine new functions
112 static bool autorefine; ///< Whether to autorefine in multiplication, etc.
113 static bool debug; ///< Controls output of debug info
114 static bool truncate_on_project; ///< If true initial projection inserts at n-1 not n
115 static bool apply_randomize; ///< If true use randomization for load balancing in apply integral operator
116 static bool project_randomize; ///< If true use randomization for load balancing in project/refine
117 static std::optional<BoundaryConditions<NDIM>> bc; ///< Default boundary conditions, not initialized by default and must be set explicitly before use
118 static Tensor<double> cell ; ///< cell[NDIM][2] Simulation cell, cell(0,0)=xlo, cell(0,1)=xhi, ...
119 static Tensor<double> cell_width;///< Width of simulation cell in each dimension
120 static Tensor<double> rcell_width; ///< Reciprocal of width
121 static double cell_volume; ///< Volume of simulation cell
122 static double cell_min_width; ///< Size of smallest dimension
123 static TensorType tt; ///< structure of the tensor in FunctionNode
124 static std::shared_ptr< WorldDCPmapInterface< Key<NDIM> > > pmap; ///< Default mapping of keys to processes
125 static int pmap_nproc; ///< Number of processes assumed by pmap, -1 indicates uninitialized pmap
126
128 if (NDIM) {
130 cell(_, 1) = 1.0;
131 return cell;
132 } else
133 return {};
134 }
135
137 if (NDIM) {
139 cell(_) = 1.0;
140 return cell;
141 } else
142 return {};
143 }
144
145 static void recompute_cell_info() {
146 MADNESS_ASSERT(cell.dim(0)==NDIM && cell.dim(1)==2 && cell.ndim()==2);
147 cell_width = cell(_,1)-cell(_,0);
151 for (std::size_t i=0; i<NDIM; ++i) rcell_width(i) = 1.0/rcell_width(i);
152 }
153
154 public:
155
156
157 /// Used to set defaults to k=7, thresh=1-5, for a unit cube [0,1].
158 /// @warning does not reset the boundary conditions if they are already set
159 static void set_defaults(World& world);
160
161 static void print();
162
163 /// Returns the default wavelet order
164 static int get_k() {
165 return k;
166 }
167
168 /// Sets the default wavelet order
169
170 /// Existing functions are unaffacted.
171 static void set_k(int value) {
172 k=value;
173 MADNESS_ASSERT(k>0 && k<=MAXK);
174 }
175
176 /// Returns the default threshold
177 static const double& get_thresh() {
178 return thresh;
179 }
180
181 /// Sets the default threshold
182
183 /// Existing functions are unaffected
184 static void set_thresh(double value) {
185 thresh=value;
186 }
187
188 /// Returns the default initial projection level
189 static int get_initial_level() {
190 return initial_level;
191 }
192
193 /// Returns the default projection level for special boxes
194 static int get_special_level() {
195 return special_level;
196 }
197
198 /// Sets the default initial projection level
199
200 /// Existing functions are unaffected
201 static void set_initial_level(int value) {
202 initial_level=value;
203 MADNESS_ASSERT(value>0 && value<MAXLEVEL);
204 }
205
206 /// Existing functions are unaffected
207 static void set_special_level(int value) {
208 special_level=value;
209 MADNESS_ASSERT(value>=0 && value<MAXLEVEL);
211 }
212
213 /// Gets the default maximum adaptive refinement level
214 static int get_max_refine_level() {
215 return max_refine_level;
216 }
217
218 /// Sets the default maximum adaptive refinement level
219
220 /// Existing functions are unaffected
227
228 /// Gets the default truncation mode
229 static int get_truncate_mode() {
230 return truncate_mode;
231 }
232
233 /// Sets the default truncation mode
234
235 /// Existing functions are unaffected
236 static void set_truncate_mode(int value) {
237 truncate_mode=value;
238 MADNESS_ASSERT(value>=0 && value<4);
239 }
240
241 /// Gets the default adaptive refinement flag
242 static bool get_refine() {
243 return refine;
244 }
245
246 /// Sets the default adaptive refinement flag
247
248 /// Existing functions are unaffected
249 static void set_refine(bool value) {
250 refine=value;
251 }
252
253 /// Gets the default adaptive autorefinement flag
254 static bool get_autorefine() {
255 return autorefine;
256 }
257
258 /// Sets the default adaptive autorefinement flag
259
260 /// Existing functions are unaffected
261 static void set_autorefine(bool value) {
262 autorefine=value;
263 }
264
265 /// Gets the default debug flag, which gates verbose MRA diagnostics
266 static bool get_debug() {
267 return debug;
268 }
269
270 /// Sets the default debug flag; see get_debug
271 static void set_debug(bool value) {
272 debug=value;
273 }
274
275 /// Gets the default truncate on project flag
277 return truncate_on_project;
278 }
279
280 /// Sets the default truncate on project flag
281
282 /// Existing functions are unaffected
283 static void set_truncate_on_project(bool value) {
285 }
286
287 /// Gets the random load balancing for integral operators flag
288 static bool get_apply_randomize() {
289 return apply_randomize;
290 }
291
292 /// Sets the random load balancing for integral operators flag
293 static void set_apply_randomize(bool value) {
294 apply_randomize=value;
295 }
296
297
298 /// Gets the random load balancing for projection flag
299 static bool get_project_randomize() {
300 return project_randomize;
301 }
302
303 /// Sets the random load balancing for projection flag
304 static void set_project_randomize(bool value) {
305 project_randomize=value;
306 }
307
308 /// Returns the default boundary conditions
310 if (!bc.has_value()) {
311 const std::string msg = "FunctionDefaults<" + std::to_string(NDIM) + ">::get_bc: must initialize boundary conditions by set_bc or set_defaults or startup";
312 MADNESS_EXCEPTION(msg.c_str(), 1);
313 }
314 return bc.value();
315 }
316
317 /// Sets the default boundary conditions
318 static void set_bc(const BoundaryConditions<NDIM>& value) {
319 bc=value;
320 }
321
322 /// Returns the default tensor type
324 return tt;
325 }
326
327 /// Sets the default tensor type
328 static void set_tensor_type(const TensorType& t) {
329#if HAVE_GENTENSOR
330 tt=t;
331#else
332 tt=TT_FULL;
333#endif
334 }
335
336 /// adapt the special level to resolve the smallest length scale
337 static int set_length_scale(const double lo,const size_t k=get_k()) {
338 const double dk = (double) k;
340 double lo_sim=lo/Lmax; // lo in simulation coordinates;
341 const int special_level=Level(-log2(lo_sim*dk));
342 return special_level;
343 }
344
345 /// Gets the user cell for the simulation
346 static const Tensor<double>& get_cell() {
347 return cell;
348 }
349
350 /// clear user cell -- will be reset once a function is loaded from file
351
352 /// Existing functions are probably rendered useless
353 static void clear_cell() {
354 cell.clear();
357 cell_volume = 0.0;
358 cell_min_width = 0.0;
359 }
360
361 /// Sets the user cell for the simulation
362
363 /// Existing functions are probably rendered useless
364 static void set_cell(const Tensor<double>& value) {
365 cell=copy(value);
367 }
368
369 /// Sets the user cell to be cubic with each dimension having range \c [lo,hi]
370
371 /// Existing functions are probably rendered useless
372 static void set_cubic_cell(double lo, double hi) {
373 cell(_,0)=lo;
374 cell(_,1)=hi;
376 }
377
378 /// Returns the width of each user cell dimension
380 return cell_width;
381 }
382
383 /// Returns the reciprocal of the width of each user cell dimension
385 return rcell_width;
386 }
387
388 /// Returns the minimum width of any user cell dimension
389 static double get_cell_min_width() {
390 return cell_min_width;
391 }
392
393 /// Returns the volume of the user cell
394 static double get_cell_volume() {
395 return cell_volume;
396 }
397
398 /// Returns the default process map that was last initialized via set_default_pmap()
399 static std::shared_ptr< WorldDCPmapInterface< Key<NDIM> > >& get_pmap() {
400 if (pmap)
401 return pmap;
402 else { // try to initialize to default, if not yet
403 if (initialized()) {
405 return pmap;
406 }
407 else
408 return pmap; // null ptr if uninitialized
409 }
410 }
411
412 /// Returns number of the default processes returned by get_pmap()
413 static int get_pmap_nproc() {
414 return pmap_nproc;
415 }
416
417 /// Returns the default process map that can be used with the given world
418 static std::shared_ptr< WorldDCPmapInterface< Key<NDIM> > > get_pmap(World& world) {
419 if (get_pmap_nproc() == world.nproc()) {
420 return get_pmap();
421 }
422 else {
423 return make_default_pmap(world);
424 }
425 }
426
427 /// Sets the default process map (does \em not redistribute existing functions)
428
429 /// Existing functions are probably rendered useless
430 static void set_pmap(const std::shared_ptr< WorldDCPmapInterface< Key<NDIM> > >& value) {
431 pmap = value;
432 }
433
434 /// Makes a default process map for the given \p world
435 static std::shared_ptr< WorldDCPmapInterface< Key<NDIM> > > make_default_pmap(World& world);
436
437 /// Sets the default process map for the use with WorldObjects in \p world
438 /// @note sets default pmap to `make_default_pmap(world)`
439 static void set_default_pmap(World& world);
440
441 /// Sets the default process map and redistributes all functions using the old map
442 static void redistribute(World& world, const std::shared_ptr< WorldDCPmapInterface< Key<NDIM> > >& newpmap) {
443 pmap->redistribute(world,newpmap);
444 pmap = newpmap;
445 }
446
447 MADNESS_PRAGMA_CLANG(diagnostic pop)
448
449 };
450
451 /// Convert user coords (cell[][]) to simulation coords ([0,1]^ndim)
452 template <std::size_t NDIM>
453 static inline void user_to_sim(const Vector<double,NDIM>& xuser, Vector<double,NDIM>& xsim) {
454 for (std::size_t i=0; i<NDIM; ++i)
456 }
457
458 /// Returns the box at level n that contains the given point in simulation coordinates
459 /// @param[in] pt point in simulation coordinates
460 /// @param[in] n the level of the box
461 template <typename T, std::size_t NDIM>
462 static inline Key<NDIM> simpt2key(const Vector<T,NDIM>& pt, Level n){
464 double twon = std::pow(2.0, double(n));
465 for (std::size_t i=0; i<NDIM; ++i) {
466 l[i] = Translation(twon*pt[i]);
467 }
468 return Key<NDIM>(n,l);
469 }
470
471 /// Convert simulation coords ([0,1]^ndim) to user coords (FunctionDefaults<NDIM>::get_cell())
472 template <std::size_t NDIM>
473 static void sim_to_user(const Vector<double,NDIM>& xsim, Vector<double,NDIM>& xuser) {
474 for (std::size_t i=0; i<NDIM; ++i)
476 }
477
478
479}
480#endif // MADNESS_MRA_FUNCDEFAULTS_H__INCLUDED
This header should include pretty much everything needed for the parallel runtime.
Provides BoundaryConditions.
long dim(int i) const
Returns the size of dimension i.
Definition basetensor.h:147
long ndim() const
Returns the number of dimensions in the tensor.
Definition basetensor.h:144
This class is used to specify boundary conditions for all operators.
Definition bc.h:72
FunctionDefaults holds default paramaters as static class members.
Definition funcdefaults.h:100
static int get_special_level()
Returns the default projection level for special boxes.
Definition funcdefaults.h:194
static Tensor< double > make_default_cell_width()
Definition funcdefaults.h:136
static void set_tensor_type(const TensorType &t)
Sets the default tensor type.
Definition funcdefaults.h:328
static int get_k()
Returns the default wavelet order.
Definition funcdefaults.h:164
static void set_apply_randomize(bool value)
Sets the random load balancing for integral operators flag.
Definition funcdefaults.h:293
static bool get_project_randomize()
Gets the random load balancing for projection flag.
Definition funcdefaults.h:299
static std::shared_ptr< WorldDCPmapInterface< Key< NDIM > > > make_default_pmap(World &world)
Makes a default process map for the given world.
Definition mraimpl.h:3708
static bool truncate_on_project
If true initial projection inserts at n-1 not n.
Definition funcdefaults.h:114
static int get_truncate_mode()
Gets the default truncation mode.
Definition funcdefaults.h:229
static void set_truncate_mode(int value)
Sets the default truncation mode.
Definition funcdefaults.h:236
static bool apply_randomize
If true use randomization for load balancing in apply integral operator.
Definition funcdefaults.h:115
static void set_truncate_on_project(bool value)
Sets the default truncate on project flag.
Definition funcdefaults.h:283
static void set_thresh(double value)
Sets the default threshold.
Definition funcdefaults.h:184
static void clear_cell()
clear user cell – will be reset once a function is loaded from file
Definition funcdefaults.h:353
static double cell_volume
Volume of simulation cell.
Definition funcdefaults.h:121
static void set_special_level(int value)
Existing functions are unaffected.
Definition funcdefaults.h:207
static void set_k(int value)
Sets the default wavelet order.
Definition funcdefaults.h:171
static void redistribute(World &world, const std::shared_ptr< WorldDCPmapInterface< Key< NDIM > > > &newpmap)
Sets the default process map and redistributes all functions using the old map.
Definition funcdefaults.h:442
static const double & get_thresh()
Returns the default threshold.
Definition funcdefaults.h:177
static int k
Wavelet order.
Definition funcdefaults.h:105
static double get_cell_volume()
Returns the volume of the user cell.
Definition funcdefaults.h:394
static int get_max_refine_level()
Gets the default maximum adaptive refinement level.
Definition funcdefaults.h:214
static bool get_debug()
Gets the default debug flag, which gates verbose MRA diagnostics.
Definition funcdefaults.h:266
static void set_debug(bool value)
Sets the default debug flag; see get_debug.
Definition funcdefaults.h:271
static int truncate_mode
Truncation method.
Definition funcdefaults.h:110
static void set_default_pmap(World &world)
Definition mraimpl.h:3715
static int pmap_nproc
Number of processes assumed by pmap, -1 indicates uninitialized pmap.
Definition funcdefaults.h:125
static bool get_refine()
Gets the default adaptive refinement flag.
Definition funcdefaults.h:242
static Tensor< double > cell_width
Width of simulation cell in each dimension.
Definition funcdefaults.h:119
static void set_autorefine(bool value)
Sets the default adaptive autorefinement flag.
Definition funcdefaults.h:261
static double thresh
Truncation threshold.
Definition funcdefaults.h:106
static void set_bc(const BoundaryConditions< NDIM > &value)
Sets the default boundary conditions.
Definition funcdefaults.h:318
static void set_project_randomize(bool value)
Sets the random load balancing for projection flag.
Definition funcdefaults.h:304
static int get_pmap_nproc()
Returns number of the default processes returned by get_pmap()
Definition funcdefaults.h:413
static bool get_autorefine()
Gets the default adaptive autorefinement flag.
Definition funcdefaults.h:254
static bool debug
Controls output of debug info.
Definition funcdefaults.h:113
static int special_level
Minimum level for fine scale projection of special boxes.
Definition funcdefaults.h:108
static double cell_min_width
Size of smallest dimension.
Definition funcdefaults.h:122
static std::shared_ptr< WorldDCPmapInterface< Key< NDIM > > > pmap
Default mapping of keys to processes.
Definition funcdefaults.h:124
static TensorType get_tensor_type()
Returns the default tensor type.
Definition funcdefaults.h:323
static const Tensor< double > & get_cell_width()
Returns the width of each user cell dimension.
Definition funcdefaults.h:379
static std::shared_ptr< WorldDCPmapInterface< Key< NDIM > > > & get_pmap()
Returns the default process map that was last initialized via set_default_pmap()
Definition funcdefaults.h:399
static void set_initial_level(int value)
Sets the default initial projection level.
Definition funcdefaults.h:201
static void set_cubic_cell(double lo, double hi)
Sets the user cell to be cubic with each dimension having range [lo,hi].
Definition funcdefaults.h:372
static void set_refine(bool value)
Sets the default adaptive refinement flag.
Definition funcdefaults.h:249
static void set_max_refine_level(int value)
Sets the default maximum adaptive refinement level.
Definition funcdefaults.h:221
static const BoundaryConditions< NDIM > & get_bc()
Returns the default boundary conditions.
Definition funcdefaults.h:309
static Tensor< double > cell
cell[NDIM][2] Simulation cell, cell(0,0)=xlo, cell(0,1)=xhi, ...
Definition funcdefaults.h:118
static void set_cell(const Tensor< double > &value)
Sets the user cell for the simulation.
Definition funcdefaults.h:364
static void set_pmap(const std::shared_ptr< WorldDCPmapInterface< Key< NDIM > > > &value)
Sets the default process map (does not redistribute existing functions)
Definition funcdefaults.h:430
static int initial_level
Initial level for fine scale projection.
Definition funcdefaults.h:107
static bool autorefine
Whether to autorefine in multiplication, etc.
Definition funcdefaults.h:112
static const Tensor< double > & get_rcell_width()
Returns the reciprocal of the width of each user cell dimension.
Definition funcdefaults.h:384
static Tensor< double > make_default_cell()
Definition funcdefaults.h:127
static std::optional< BoundaryConditions< NDIM > > bc
Default boundary conditions, not initialized by default and must be set explicitly before use.
Definition funcdefaults.h:117
static int set_length_scale(const double lo, const size_t k=get_k())
adapt the special level to resolve the smallest length scale
Definition funcdefaults.h:337
static void print()
Definition mraimpl.h:3722
static std::shared_ptr< WorldDCPmapInterface< Key< NDIM > > > get_pmap(World &world)
Returns the default process map that can be used with the given world.
Definition funcdefaults.h:418
static Tensor< double > rcell_width
Reciprocal of width.
Definition funcdefaults.h:120
static bool get_apply_randomize()
Gets the random load balancing for integral operators flag.
Definition funcdefaults.h:288
static double get_cell_min_width()
Returns the minimum width of any user cell dimension.
Definition funcdefaults.h:389
static void recompute_cell_info()
Definition funcdefaults.h:145
static bool project_randomize
If true use randomization for load balancing in project/refine.
Definition funcdefaults.h:116
static const Tensor< double > & get_cell()
Gets the user cell for the simulation.
Definition funcdefaults.h:346
static void set_defaults(World &world)
Definition mraimpl.h:3687
static int max_refine_level
Level at which to stop refinement.
Definition funcdefaults.h:109
static TensorType tt
structure of the tensor in FunctionNode
Definition funcdefaults.h:123
static int get_initial_level()
Returns the default initial projection level.
Definition funcdefaults.h:189
static bool get_truncate_on_project()
Gets the default truncate on project flag.
Definition funcdefaults.h:276
static bool refine
Whether to refine new functions.
Definition funcdefaults.h:111
Key is the index for a node of the 2^NDIM-tree.
Definition key.h:70
A tensor is a multidimensional array.
Definition tensor.h:318
T max(long *ind=0) const
Return the maximum value (and if ind is non-null, its index) in the Tensor.
Definition tensor.h:1704
T product() const
Return the product of all elements of the tensor.
Definition tensor.h:1677
T min(long *ind=0) const
Return the minimum value (and if ind is non-null, its index) in the Tensor.
Definition tensor.h:1684
void clear()
Frees all memory and resests to state of default constructor.
Definition tensor.h:1901
A simple, fixed dimension vector.
Definition vector.h:64
Interface to be provided by any process map.
Definition worlddc.h:122
A parallel world class.
Definition world.h:134
static World & get_default()
Default World object accessor.
Definition world.h:269
ProcessID nproc() const
Returns the number of processes in this World (same as MPI_Comm_size()).
Definition world.h:349
static double lo
Definition dirac-hatom.cc:23
Multidimension Key for MRA tree and associated iterators.
#define MADNESS_PRAGMA_CLANG(x)
Definition madness_config.h:200
#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
Namespace for all elements and tools of MADNESS.
Definition DFParameters.h:10
std::ostream & operator<<(std::ostream &os, const particle< PDIM > &p)
Definition lowrankfunction.h:401
static Key< NDIM > simpt2key(const Vector< T, NDIM > &pt, Level n)
Definition funcdefaults.h:462
TreeState
Definition funcdefaults.h:59
@ nonstandard_after_apply
s and d coeffs, state after operator application
Definition funcdefaults.h:64
@ on_demand
no coeffs anywhere, but a functor providing if necessary
Definition funcdefaults.h:67
@ redundant_after_merge
s coeffs everywhere, must be summed up to yield the result
Definition funcdefaults.h:66
@ reconstructed
s coeffs at the leaves only
Definition funcdefaults.h:60
@ nonstandard
s and d coeffs in internal nodes
Definition funcdefaults.h:62
@ unknown
Definition funcdefaults.h:68
@ compressed
d coeffs in internal nodes, s and d coeffs at the root, empty leaves may be present
Definition funcdefaults.h:61
@ redundant
s coeffs everywhere
Definition funcdefaults.h:65
@ nonstandard_with_leaves
like nonstandard, with s coeffs at the leaves
Definition funcdefaults.h:63
static void user_to_sim(const Vector< double, NDIM > &xuser, Vector< double, NDIM > &xsim)
Convert user coords (cell[][]) to simulation coords ([0,1]^ndim)
Definition funcdefaults.h:453
int64_t Translation
Definition key.h:58
static void sim_to_user(const Vector< double, NDIM > &xsim, Vector< double, NDIM > &xuser)
Convert simulation coords ([0,1]^ndim) to user coords (FunctionDefaults<NDIM>::get_cell())
Definition funcdefaults.h:473
static const int MAXLEVEL
The maximum depth of refinement possible.
Definition funcdefaults.h:57
static const Slice _(0,-1, 1)
int Level
Definition key.h:59
bool initialized()
Check if the MADNESS runtime has been initialized (and not subsequently finalized).
Definition world.cc:75
static double pop(std::vector< double > &v)
Definition SCF.cc:116
TensorType
low rank representations of tensors (see gentensor.h)
Definition gentensor.h:120
@ TT_FULL
Definition gentensor.h:120
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:2187
static const int MAXK
The maximum wavelet order presently supported.
Definition funcdefaults.h:54
Defines and implements most of Tensor.
constexpr std::size_t NDIM
Definition testgconv.cc:54
Implement the madness:Vector class, an extension of std::array that supports some mathematical operat...
Implements WorldContainer.