|
MADNESS 0.10.1
|
FunctionFactory implements the named-parameter idiom for Function. More...
#include <function_factory.h>


Public Member Functions | |
| FunctionFactory (World &world) | |
| virtual | ~FunctionFactory () |
| FunctionFactory & | autorefine () |
| FunctionFactory & | compressed (bool value=true) |
| FunctionFactory & | empty () |
| FunctionFactory & | f (T(*f)(const coordT &)) |
| FunctionFactory & | fence (bool fence=true) |
| template<typename opT> | |
| std::enable_if< notstd::is_base_of< FunctionFunctorInterface< T, NDIM >, opT >::value, FunctionFactory & >::type | functor (const opT &op) |
| pass in a functor that is not derived from FunctionFunctorInterface | |
| template<typename opT> | |
| std::enable_if< std::is_base_of< FunctionFunctorInterface< T, NDIM >, opT >::value, FunctionFactory & >::type | functor (const opT &op) |
| pass in a functor that is derived from FunctionFunctorInterface | |
| FunctionFactory & | functor (const std::shared_ptr< FunctionFunctorInterface< T, NDIM > > &f) |
| virtual std::shared_ptr< FunctionFunctorInterface< T, NDIM > > | get_functor () const |
| return the functor; override this if the functor needs deferred construction | |
| int | get_k () const |
| double | get_thresh () const |
| World & | get_world () const |
| FunctionFactory & | initial_level (int initial_level) |
| virtual FunctionFactory & | is_on_demand () |
| virtual FunctionFactory & | k (int k) |
| FunctionFactory & | max_refine_level (int max_refine_level) |
| FunctionFactory & | no_functor () |
| FunctionFactory & | noautorefine () |
| FunctionFactory & | nofence () |
| FunctionFactory & | norefine (bool norefine=true) |
| FunctionFactory & | notruncate_on_project () |
| FunctionFactory & | pmap (const std::shared_ptr< WorldDCPmapInterface< Key< NDIM > > > &pmap) |
| FunctionFactory & | refine (bool refine=true) |
| FunctionFactory & | self () |
| implement this in all derived classes for correct chaining | |
| FunctionFactory & | special_level (int special_level) |
| FunctionFactory & | special_points (const std::vector< Vector< double, NDIM > > &special_points) |
| virtual FunctionFactory & | thresh (double thresh) |
| FunctionFactory & | treestate (const TreeState state) |
| FunctionFactory & | truncate_mode (int truncate_mode) |
| FunctionFactory & | truncate_on_project () |
Protected Attributes | |
| bool | _autorefine |
| bool | _empty |
| bool | _fence |
| int | _initial_level = FunctionDefaults<NDIM>::get_initial_level() |
| int | _k |
| int | _max_refine_level |
| std::shared_ptr< WorldDCPmapInterface< Key< NDIM > > > | _pmap |
| bool | _refine |
| int | _special_level = FunctionDefaults<NDIM>::get_special_level() |
| std::vector< Vector< double, NDIM > > | _special_points |
| double | _thresh |
| TreeState | _tree_state |
| int | _truncate_mode |
| bool | _truncate_on_project |
| World & | _world |
Private Types | |
| typedef Vector< double, NDIM > | coordT |
| Type of vector holding coordinates. | |
Private Attributes | |
| std::shared_ptr< FunctionFunctorInterface< T, NDIM > > | _functor |
Friends | |
| class | FunctionImpl< T, NDIM > |
FunctionFactory implements the named-parameter idiom for Function.
C++ does not provide named arguments (as does, e.g., Python). This class provides something very close. Create functions as follows
where the methods of function factory, which specify the non-default arguments eventually passed to the Function constructor, can be used in any order.
Need to add a general functor for initial projection with a standard interface.
|
private |
Type of vector holding coordinates.
|
inline |
|
inlinevirtual |
|
inline |
|
inline |
Referenced by madness::MP2::add_local_coupling(), MicroTask1::allocator(), MicroTaskPartitioner::allocator(), MicroTaskPriority::allocator(), madness::OEP::compute_total_kinetic_density(), madness::Nemo::make_density(), MatrixOperator::operator()(), madness::XCOperator< T, NDIM >::set_tau(), madness::sum(), and test_diagnose_GQKffK().
|
inline |
Referenced by madness::apply(), madness::composite_product(), madness::composite_product(), FunctionIOData< T, NDIM >::create_function(), madness::hartree_product(), madness::hartree_product(), madness::innerXX(), madness::CCPotentials::make_constant_part_macrotask(), madness::project(), FunctionIO< double, D >::read_function(), and read_function().
|
inline |
Referenced by madness::SCF::analyze_vectors(), bind_function_type(), check_multiplication_table_c2v(), check_operator_multiplications_2d(), check_operator_multiplications_3d(), compute_update(), cplxfunc0(), cplxfunc1(), cplxfunc2(), doit(), expV(), madness::CompositeFactory< T, NDIM, MDIM >::g12(), data< T, NDIM >::initialize(), DF::iterate(), madness::CompositeFactory< T, NDIM, MDIM >::ket(), madness::CompositeFactory< T, NDIM, MDIM >::ket(), main(), madness::smooth< T, NDIM >::make_inv_mask(), make_potential(), madness::LRFunctorF12< T, NDIM, LDIM >::norm2(), madness::CompositeFactory< T, NDIM, MDIM >::particle1(), madness::CompositeFactory< T, NDIM, MDIM >::particle1(), madness::CompositeFactory< T, NDIM, MDIM >::particle2(), madness::CompositeFactory< T, NDIM, MDIM >::particle2(), plot_symmetry_operators(), print_info(), propagate(), propagate(), propagate(), q_c(), madness::InitParameters::read(), realfunc0(), realfunc1(), realfunc2(), run(), run(), run_one(), run_tests(), solve(), test(), test(), madness::smooth< T, NDIM >::test_1d(), test_adaptive_tree(), test_add(), test_chin_chen(), test_compress(), test_consolidate_vs_direct(), test_convolution(), test_ctor_orthonormalization(), test_diagnose_GQKffK(), test_diagnose_GQUe(), test_diagnose_GUe(), test_diagnose_Ue(), test_driver_keeps_root(), test_driver_rejects_nonfinite_cost(), test_exchange(), test_gconv(), test_GQUe(), test_GUe(), test_hartree_product(), test_he(), test_he_potential(), test_hf_be(), test_hf_h2(), test_hf_he(), test_hydro(), test_inner(), test_meta_gga(), test_meta_gga_one_orbital_energy(), test_modified(), test_multiply(), test_node_replicated_function(), test_orthogonalization(), madness::CCPotentials::test_pairs(), test_per(), test_periodic(), test_periodic1(), test_periodic2(), test_periodic_bsh(), test_project_ab(), test_projector(), test_projector_outer(), test_recursive_application(), test_replicate(), madness::CCPotentials::test_singles_potential(), test_slater_exchange(), test_sum_down(), test_swap_particles(), test_trotter(), test_truncation(), test_tt2d_summation(), test_vector_composite(), test_Vphi_ij_u(), test_with_function(), test_with_function_vector(), test_xc2(), testbsh(), testNavierStokes(), testPeriodicCoulomb3d(), madness::CompositeFactory< T, NDIM, MDIM >::V_for_particle1(), and madness::CompositeFactory< T, NDIM, MDIM >::V_for_particle2().
|
inline |
Referenced by madness::apply().
|
inline |
pass in a functor that is not derived from FunctionFunctorInterface
similar to the first version of functor, but easy-to-use
|
inline |
pass in a functor that is derived from FunctionFunctorInterface
similar to the first version of functor, but easy-to-use FunctionFunctorInterface must be a public base of opT
|
inline |
Referenced by madness::Diamagnetic_potential_factor::Diamagnetic_potential_factor(), KPeriodicBSHOperator::KPeriodicBSHOperator(), KPeriodicBSHOperator::KPeriodicBSHOperator(), LProjector::LProjector(), SVPESolver::SVPESolver(), madness::SCF::analyze_vectors(), madness::Solver< T, NDIM >::apply_hf_exchange4(), apply_periodic_bsh(), madness::Diamagnetic_potential_factor::bare_diamagnetic_potential(), bench_cell(), Calculation::calc_optimal_coeffs(), madness::MolecularOrbitals< T, NDIM >::compute_center(), madness::guessfactory::compute_centroid(), madness::guessfactory::compute_centroids(), madness::Nemo::compute_cphf_parallel_term(), madness::OEP::compute_dcep_correction(), madness::OEP::compute_exchange_energy_vir(), madness::Znemo::compute_linear_moment(), madness::Diamagnetic_potential_factor::compute_lz_commutator(), madness::Znemo::compute_magnetic_vector_potential(), madness::OEP::compute_mrks_correction(), madness::Diamagnetic_potential_factor::compute_nabla_R_div_R(), madness::Diamagnetic_potential_factor::compute_R_times_T_commutator_scalar_term_numerically(), Calculation::compute_residuals(), madness::OEP::compute_slater_potential(), madness::OEP::compute_total_kinetic_density(), madness::Diamagnetic_potential_factor::compute_U2(), madness::NemoBase::construct_nuclear_correlation_factor(), madness::Diamagnetic_potential_factor::custom_factor(), madness::Znemo::custom_guess(), madness::SCF::dipole(), dnuclear_anchor_test(), MiniDFT::doit(), Plotter::doplot1(), exchange_anchor_test(), madness::exchange_anchor_test(), madness::FunctionFactory< double, 3 >::f(), madness::Diamagnetic_potential_factor::factor_with_phase(), fixphases(), madness::NuclearCorrelationFactor::function(), ExactSpinor::get_spinor(), sgl_guess::get_wf(), golden_check_ndim(), madness::LowRankFunctionFactory< T, NDIM, LDIM >::harmonic_basis(), madness::Znemo::hcore_guess(), madness::Nemo::hessian(), madness::SCF::initial_guess_ao_eigenvectors(), madness::NuclearCorrelationFactor::initialize(), madness::LRFunctorF12< T, NDIM, LDIM >::inner(), madness::NuclearCorrelationFactor::inverse(), madness::Localizer::localize_boys(), main(), make_basis(), madness::Nemo::make_cphf_constant_term(), madness::Nemo::make_ddensity(), madness::Diamagnetic_potential_factor::make_fake_orbitals(), DF::make_fermi_potential(), DF::make_gaussian_potential(), DF::make_gaussian_potential(), Ansatz0::make_guess(), make_Hd(), make_Hv(), madness::Nemo::make_incomplete_hessian(), make_nuclear_charge_density(), make_nuclear_charge_density_individual(), make_operands(), DF::make_point_potential(), DF::make_point_potential(), madness::GTHPseudopotential< Q >::make_pseudo_potential(), Calculation::make_reference(), make_ri_basis(), madness::Nemo::make_sigma(), Calculation::make_Upsi(), madness::TDHF::make_virtuals(), makeao(), MiniDFT::makeao(), makeao_slow(), moments(), madness::ProjRLMStore::nlmproj(), nuclear_anchor_test(), BoysLocalization::operator()(), madness::DNuclear< T, NDIM >::operator()(), madness::Lz< T, NDIM >::operator()(), madness::TDHF::oscillator_strength_length(), project(), madness::Solver< T, NDIM >::project_ao_basis(), madness::SCF::project_ao_basis_only(), Ansatz0::R(), random_gaussians(), madness::Znemo::recompute_factors_and_potentials(), Ansatz0::Rinv(), run(), run_batched_cell(), run_correctness_cell(), madness::XCOperator< T, NDIM >::set_tau(), simple_example(), madness::Nemo::solve_cphf(), madness::NuclearCorrelationFactor::square(), madness::NuclearCorrelationFactor::square_times_V_derivative(), test(), test(), test2(), test_adaptive_diagnosis(), test_adaptive_grid_projection(), test_adaptive_project(), test_add(), test_apply_push_1d(), test_arithmetic(), test_asymmetric(), test_basic(), test_bsh(), test_combined_operators(), madness::Znemo::test_compute_current_density(), test_construction(), test_conv(), test_converged_function(), test_convergence(), test_conversion(), test_copy_function_from_other_world(), test_copy_function_from_other_world_through_cloud(), test_coulomb(), test_cross(), test_diff(), test_direct_projection(), test_dot(), madness::test_exchange(), test_exchange(), madness::Diamagnetic_potential_factor::test_factor(), test_fock(), test_gaussian_num_coeffs(), madness::Diamagnetic_potential_factor::test_harmonic_potential(), test_hermiticity(), test_hf_he(), test_inner(), test_inner(), test_integration(), test_invrsq_operator(), test_io(), test_kinetic(), madness::Znemo::test_landau_wave_function(), test_lowrank_function(), test_math(), test_matrix_mul_sparse(), test_multi_to_multi_op(), test_nuclear_potential(), test_numerics(), test_op(), test_opdir(), test_operator_apply(), test_orthonormalize_canonical(), test_orthonormalize_symmetric(), test_output_param_overload(), test_partial_inner(), test_plot(), test_pointer_to_funcimpl(), test_proj(), test_projector(), test_Q12_projector(), test_qm(), test_redistribute_to_batches(), test_remove_lindep(), test_replication_policy(), test_rot(), test_size(), test_spherical_box(), test_tight_diffuse(), test_transform(), test_unaryop(), test_weighted_bra_exchange(), test_XCOperator(), test_XCOperator_matrix(), testgradG(), and madness::LowRankFunctionFactory< T, NDIM, LDIM >::Yformer().
|
inlinevirtual |
return the functor; override this if the functor needs deferred construction
Reimplemented in madness::CompositeFactory< T, NDIM, MDIM >, and madness::TwoElectronFactory< T, NDIM >.
|
inline |
|
inline |
|
inline |
|
inline |
Referenced by madness::SCF::analyze_vectors(), madness::MolecularOrbitals< T, NDIM >::compute_center(), expV(), madness::Localizer::localize_boys(), main(), make_nuclear_charge_density(), make_nuclear_charge_density_individual(), Calculation::make_reference(), Calculation::make_Upsi(), BoysLocalization::operator()(), Calculation::project_potential_basis(), test_conv(), test_coulomb(), test_hf_be(), test_hydro(), test_per(), and test_qm().
|
inlinevirtual |
Referenced by run_tests(), test_multiply(), test_vector_composite(), and test_Vphi_ij_u().
|
inlinevirtual |
Referenced by madness::apply(), bind_function_type(), FunctionIOData< T, NDIM >::create_function(), madness::Function< double, 3 >::dirac_convolution(), madness::hartree_product(), madness::hartree_product(), madness::innerXX(), main(), madness::project(), madness::Function< double, 3 >::project_out(), FunctionIO< double, D >::read_function(), read_function(), and test_conv().
|
inline |
|
inline |
|
inline |
Referenced by Calculation::project_potential_basis().
|
inline |
|
inline |
Referenced by test_conv(), and test_per().
|
inline |
|
inline |
|
inline |
|
inline |
implement this in all derived classes for correct chaining
Referenced by madness::FunctionFactory< double, 3 >::autorefine(), madness::FunctionFactory< double, 3 >::compressed(), madness::FunctionFactory< double, 3 >::empty(), madness::FunctionFactory< double, 3 >::f(), madness::FunctionFactory< double, 3 >::fence(), madness::FunctionFactory< double, 3 >::functor(), madness::FunctionFactory< double, 3 >::functor(), madness::FunctionFactory< double, 3 >::initial_level(), madness::FunctionFactory< double, 3 >::is_on_demand(), madness::FunctionFactory< double, 3 >::k(), madness::FunctionFactory< double, 3 >::max_refine_level(), madness::FunctionFactory< double, 3 >::no_functor(), madness::FunctionFactory< double, 3 >::noautorefine(), madness::FunctionFactory< double, 3 >::nofence(), madness::FunctionFactory< double, 3 >::norefine(), madness::FunctionFactory< double, 3 >::notruncate_on_project(), madness::FunctionFactory< double, 3 >::pmap(), madness::FunctionFactory< double, 3 >::refine(), madness::FunctionFactory< double, 3 >::special_level(), madness::FunctionFactory< double, 3 >::special_points(), madness::FunctionFactory< double, 3 >::thresh(), madness::FunctionFactory< double, 3 >::treestate(), madness::FunctionFactory< double, 3 >::truncate_mode(), and madness::FunctionFactory< double, 3 >::truncate_on_project().
|
inline |
Referenced by madness::NemoBase::construct_nuclear_correlation_factor(), madness::NuclearCorrelationFactor::function(), madness::NuclearCorrelationFactor::initialize(), madness::NuclearCorrelationFactor::inverse(), madness::NuclearCorrelationFactor::square(), and madness::NuclearCorrelationFactor::square_times_V_derivative().
|
inline |
|
inlinevirtual |
Reimplemented in madness::TwoElectronFactory< T, NDIM >.
Referenced by madness::apply(), madness::CCPotentials::apply_transformed_Ue(), bind_function_type(), doit(), MiniDFT::doit(), exchange_anchor_test(), madness::exchange_anchor_test(), madness::CCPotentials::fock_residue_6d(), madness::CCPotentials::fock_residue_6d_macrotask(), madness::NuclearCorrelationFactor::function(), madness::MP2::guess_mp1_3(), madness::hartree_product(), madness::hartree_product(), madness::NuclearCorrelationFactor::initialize(), madness::innerXX(), madness::NuclearCorrelationFactor::inverse(), main(), DF::make_fermi_potential(), Calculation::make_reference(), madness::MP2::make_Uphi0(), Calculation::make_Upsi(), madness::MP2::multiply_with_0th_order_Hamiltonian(), madness::DNuclear< T, NDIM >::operator()(), madness::project(), madness::Function< double, 3 >::project_out(), madness::NuclearCorrelationFactor::square(), madness::NuclearCorrelationFactor::square_times_V_derivative(), test(), test_coulomb(), madness::test_exchange(), test_exchange(), test_he(), test_hf_be(), and test_hydro().
|
inline |
Referenced by madness::NonlinearSolverND< 3 >::update().
|
inline |
Referenced by KPeriodicBSHOperator::KPeriodicBSHOperator(), KPeriodicBSHOperator::KPeriodicBSHOperator(), apply_periodic_bsh(), fixphases(), main(), DF::make_gaussian_potential(), DF::make_gaussian_potential(), DF::make_point_potential(), DF::make_point_potential(), makeao(), MiniDFT::makeao(), makeao_slow(), madness::ProjRLMStore::nlmproj(), madness::Solver< T, NDIM >::project_ao_basis(), madness::SCF::project_ao_basis_only(), and run().
|
inline |
Referenced by KPeriodicBSHOperator::KPeriodicBSHOperator(), KPeriodicBSHOperator::KPeriodicBSHOperator(), apply_periodic_bsh(), madness::Nemo::compute_cphf_parallel_term(), madness::OEP::compute_total_kinetic_density(), madness::Diamagnetic_potential_factor::compute_U2(), dnuclear_anchor_test(), MiniDFT::doit(), exchange_anchor_test(), madness::exchange_anchor_test(), fixphases(), madness::NuclearCorrelationFactor::function(), madness::Nemo::hessian(), madness::SCF::initial_guess_ao_eigenvectors(), madness::NuclearCorrelationFactor::initialize(), madness::NuclearCorrelationFactor::inverse(), main(), make_basis(), madness::Nemo::make_cphf_constant_term(), madness::Nemo::make_ddensity(), DF::make_gaussian_potential(), DF::make_gaussian_potential(), make_nuclear_charge_density(), make_nuclear_charge_density_individual(), DF::make_point_potential(), DF::make_point_potential(), madness::GTHPseudopotential< Q >::make_pseudo_potential(), makeao(), MiniDFT::makeao(), makeao_slow(), madness::ProjRLMStore::nlmproj(), nuclear_anchor_test(), madness::DNuclear< T, NDIM >::operator()(), print_info(), madness::Solver< T, NDIM >::project_ao_basis(), madness::SCF::project_ao_basis_only(), Calculation::project_potential_basis(), q_c(), madness::XCOperator< T, NDIM >::set_tau(), madness::Nemo::solve_cphf(), madness::NuclearCorrelationFactor::square(), madness::NuclearCorrelationFactor::square_times_V_derivative(), test_asymmetric(), test_coulomb(), madness::test_exchange(), test_exchange(), test_fock(), test_gaussian_num_coeffs(), test_hermiticity(), test_kinetic(), test_slater_exchange(), test_XCOperator_matrix(), and testNavierStokes().
|
friend |
|
protected |
|
protected |
Referenced by madness::FunctionImpl< T, LDIM >::FunctionImpl().
|
protected |
Referenced by madness::FunctionImpl< T, LDIM >::FunctionImpl().
|
private |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Referenced by madness::FunctionImpl< T, LDIM >::FunctionImpl().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |