8#ifndef SRC_APPS_CHEM_CCPOTENTIALS_H_
9#define SRC_APPS_CHEM_CCPOTENTIALS_H_
22 CCPotentials(World& world_,
const std::shared_ptr<Nemo> nemo,
const CCParameters&
param);
24 void reset_nemo(
const std::shared_ptr<Nemo> nemo) {
26 mo_ket_ = (make_mo_ket(*nemo));
27 mo_bra_ = (make_mo_bra(*nemo));
28 orbital_energies_ = init_orbital_energies(*nemo);
31 Info update_info(
const CCParameters& parameters,
const std::shared_ptr<Nemo> nemo)
const {
33 info.mo_bra = mo_bra().get_vecfunction();
34 info.mo_ket = mo_ket().get_vecfunction();
35 info.molecular_coordinates = nemo->get_calc()->molecule.get_all_coords_vec();
36 info.parameters = parameters;
37 info.R_square = nemo->R_square;
39 info.U1 = nemo->ncf->U1vec();
40 info.U2 = nemo->ncf->U2();
41 info.intermediate_potentials = get_potentials;
42 info.orbital_energies = orbital_energies_;
43 info.fock=nemo->compute_fock_matrix(nemo->get_calc()->amo, nemo->get_calc()->aocc);
51 void test_pair_consistency(
const CCPairFunction<double, 6>&
u,
const size_t i,
const size_t j,
52 const CC_vecfunction& x)
const;
54 bool test_compare_pairs(
const CCPair& pair1,
const CCPair& pair2)
const;
58 void test_singles_potential(Info& info)
const;
70 template <
typename T,
size_t NDIM>
71 bool load_function(Function<T, NDIM>&
f,
const std::string name,
bool do_print)
const {
72 bool exists = archive::ParallelInputArchive<
73 archive::BinaryFstreamInputArchive>::exists(world,
name.c_str());
75 if ((world.rank() == 0) and do_print)
print(
"loading function", name);
76 archive::ParallelInputArchive<archive::BinaryFstreamInputArchive> ar(world,
name.c_str());
78 if (do_print)
f.print_size(name);
79 if (
f.is_compressed()) {
80 if (world.rank()==0 and do_print)
print(
"function is compressed -- reconstructing");
81 f.change_tree_state(reconstructed);
82 if (do_print)
f.print_size(name+
" reconstructed");
85 f.set_thresh(FunctionDefaults<NDIM>::get_thresh());
90 if ((world.rank()==0) and do_print)
print(
"could not find function",name);
96 void plot(
const vector_real_function_3d&
f,
const std::string& msg)
const;
99 void plot(
const real_function_3d&
f,
const std::string& msg,
const bool doprint =
true)
const;
102 template <
size_t NDIM>
103 void print_size(
const Function<double, NDIM>&
f,
const std::string& msg,
const bool print =
true)
const {
104 if (
print)
f.print_size(msg);
108 std::vector<double> get_orbital_energies()
const {
return orbital_energies_; }
111 double get_epsilon(
const size_t i,
const size_t j)
const {
112 return orbital_energies_[i] + orbital_energies_[j];
116 static double get_epsilon(
const size_t i,
const size_t j,
const Info& info) {
117 return info.orbital_energies[i] + info.orbital_energies[j];
123 for (
size_t i = parameters.freeze(); i < mo_ket_.size(); i++) result.push_back(mo_ket_(i).function);
130 for (
size_t i = parameters.freeze(); i < mo_bra_.size(); i++) result.push_back(mo_bra_(i).function);
137 for (
const auto& ktmp : ket.functions) {
138 result.push_back(mo_bra_(ktmp.first).function);
144 CCFunction<double, 3> mo_ket(
const size_t& i)
const {
149 CC_vecfunction mo_ket()
const {
154 CCFunction<double, 3> mo_bra(
const size_t& i)
const {
159 CC_vecfunction mo_bra()
const {
165 return make_bra(t.get_vecfunction());
177 CC_vecfunction make_t_intermediate(
const CC_vecfunction& tau,
const CCParameters& parameters)
const;
182 CC_vecfunction make_full_t_intermediate(
const CC_vecfunction& tau)
const;
187 static CC_vecfunction make_full_t_intermediate(
const CC_vecfunction& tau,
const Info& info);
193 static CC_vecfunction make_active_t_intermediate(
const CC_vecfunction& tau,
const Info& info);
198 CCFunction<double, 3> make_t_intermediate(
const CCFunction<double, 3>& tau)
const;
203 make_mo_bra(
const Nemo& nemo)
const;
207 make_mo_ket(
const Nemo& nemo)
const;
211 init_orbital_energies(
const Nemo& nemo)
const;
215 static CCPair make_pair_mp2(World& world,
const real_function_6d&
u,
const size_t i,
const size_t j,
216 const Info& info,
bool compute_Q12_f12_ij);
219 static CCPair make_pair_cc2(World& world,
const real_function_6d&
u,
220 const CC_vecfunction& gs_singles,
const size_t i,
const size_t j,
const Info& info,
const bool compute_Q12_f12_ij);
223 static CCPair make_pair_lrcc2(World& world,
const CalcType& ctype,
224 const real_function_6d&
u,
const CC_vecfunction& gs_singles,
225 const CC_vecfunction& ex_singles,
const size_t i,
const size_t j,
const Info& info,
226 const bool compute_Q12_f12);
241 make_pair_gs(
const real_function_6d&
u,
const CC_vecfunction& tau,
const size_t i,
const size_t j)
const;
259 make_pair_ex(
const real_function_6d&
u,
const CC_vecfunction& tau,
const CC_vecfunction& x,
const size_t i,
260 const size_t j,
const CalcType ctype)
const;
270 compute_pair_correlation_energy(World& world,
272 const CC_vecfunction& singles,
283 compute_cc2_correlation_energy(World& world,
const CC_vecfunction& singles,
const Pairs<CCPair>& doubles,
284 const Info& info,
const std::string msg=
"");
288 compute_kinetic_energy(World& world,
const vector_real_function_3d& xbra,
const vector_real_function_3d& xket);
292 compute_cis_expectation_value(World& world,
const CC_vecfunction& x,
293 const vector_real_function_3d&
V,
const bool print,
const Info& info);
298 compute_excited_pair_energy(World& world,
const CCPair&
d,
const CC_vecfunction& x,
const Info& info);
302 compute_cispd_energy(
const CC_vecfunction& x,
const Pairs<CCPair> mp2,
const Pairs<CCPair> cispd)
const;
306 compute_cc2_excitation_energy(
const CC_vecfunction& stau,
const CC_vecfunction& sx,
const Pairs<CCPair> dtau,
307 const Pairs<CCPair> dx)
const;
313 fock_residue_6d(
const CCPair&
u)
const;
317 fock_residue_6d_macrotask(World& world,
const CCPair&
u,
const CCParameters& parameters,
319 const std::vector<real_function_3d>& mo_ket,
320 const std::vector<real_function_3d>& mo_bra,
321 const std::vector<real_function_3d>& U1,
322 const real_function_3d& U2);
326 make_constant_part_mp2_macrotask(World& world,
const CCPair& pair,
const std::vector<real_function_3d>& mo_ket,
327 const std::vector<real_function_3d>& mo_bra,
328 const CCParameters& parameters,
const real_function_3d& Rsquare,
329 const std::vector<real_function_3d>& U1,
330 const std::vector<std::string> argument);
341 make_constant_part_macrotask(World& world,
const CCPair& pair,
342 const CC_vecfunction& gs_singles,
const CC_vecfunction& ex_singles,
348 update_pair_mp2_macrotask(World& world,
const CCPair& pair,
const CCParameters& parameters,
350 const std::vector<real_function_3d>& mo_ket,
351 const std::vector<real_function_3d>& mo_bra,
352 const std::vector<real_function_3d>& U1,
353 const real_function_3d& U2,
const real_function_6d& mp2_coupling);
357 static CCPair iterate_pair_macrotask(World& world,
358 const CCPair& pair,
const CC_vecfunction& gs_singles,
359 const CC_vecfunction& ex_singles,
360 const real_function_6d& coupling,
const Info& info,
const long maxiter);
365 make_constant_part_cispd(
const CCPair&
u,
const CC_vecfunction& x,
366 const real_convolution_6d* Gscreen = NULL)
const;
370 make_constant_part_cispd_Qt(
const CCPair&
u,
const CC_vecfunction& x,
371 const real_convolution_6d* Gscreen = NULL)
const;
380 apply_Vreg(
const CCFunction<double, 3>& ti,
const CCFunction<double, 3>& tj,
381 const real_convolution_6d* Gscreen = NULL)
const;
389 std::vector<CCPairFunction<double, 6>>
390 static apply_Vreg(World& world,
const CCFunction<double, 3>& ti,
const CCFunction<double, 3>& tj,
391 const CC_vecfunction& gs_singles,
const CC_vecfunction& ex_singles,
392 const Info& info,
const std::vector<std::string>& argument,
const double bsh_eps);
397 apply_Vreg_macrotask(World& world,
const std::vector<real_function_3d>& mo_ket,
398 const std::vector<real_function_3d>& mo_bra,
399 const CCParameters& parameters,
const real_function_3d& Rsquare,
400 const std::vector<real_function_3d>& U1,
const size_t& i,
const size_t& j,
401 const FuncType& x_type,
const FuncType& y_type,
402 const std::vector<std::string> argument,
403 const real_convolution_6d* Gscreen = NULL);
414 apply_reduced_F1(
const CCFunction<double, 3>& ti,
const CCFunction<double, 3>& tj,
415 const real_convolution_6d* Gscreen = NULL)
const;
426 static apply_reduced_F(World& world,
const CCFunction<double, 3>& ti,
const CCFunction<double, 3>& tj,
427 const Info& info,
const real_convolution_6d* Gscreen = NULL);
440 apply_transformed_Ue(
const CCFunction<double, 3>& x,
const CCFunction<double, 3>& y,
441 const real_convolution_6d* Gscreen = NULL)
const;
446 static apply_transformed_Ue_macrotask(World& world,
const std::vector<real_function_3d>& mo_ket,
447 const CCParameters& parameters,
const real_function_3d& Rsquare,
448 const std::vector<real_function_3d>& U1,
const size_t& i,
const size_t& j,
449 const FuncType& x_type,
const FuncType& y_type,
450 const real_convolution_6d* Gscreen = NULL);
453 static apply_Ue(World& world,
const CCFunction<double, 3>& phi_i,
const CCFunction<double, 3>& phi_j,
454 const Info& info,
const real_convolution_6d* Gscreen);
458 apply_KffK(World& world,
const CCFunction<double, 3>& phi_i,
const CCFunction<double, 3>& phi_j,
459 const Info& info,
const real_convolution_6d* Gscreen);
460 static CCPairFunction<double, 6>
461 apply_commutator_F_Qt_f12(World& world,
const CCFunction<double, 3>& phi_i,
const CCFunction<double, 3>& phi_j,
462 const CC_vecfunction& gs_singles,
const CC_vecfunction& ex_singles,
463 const Info& info,
const real_convolution_6d* Gscreen);
465 static CCPairFunction<double, 6>
466 apply_commutator_F_dQt_f12(World& world,
const CCFunction<double, 3>& phi_i,
const CCFunction<double, 3>& phi_j,
467 const CC_vecfunction& gs_singles,
const CC_vecfunction& ex_singles,
468 const Info& info,
const real_convolution_6d* Gscreen);
482 apply_exchange_commutator(
const CCFunction<double, 3>& x,
const CCFunction<double, 3>& y,
483 const real_convolution_6d* Gscreen = NULL)
const;
486 static apply_exchange_commutator_macrotask(World& world,
const std::vector<real_function_3d>& mo_ket,
487 const std::vector<real_function_3d>& mo_bra,
488 const real_function_3d& Rsquare,
489 const size_t& i,
const size_t& j,
const CCParameters& parameters,
490 const FuncType& x_type,
const FuncType& y_type,
491 const real_convolution_6d* Gscreen = NULL);
495 apply_exchange_commutator1(
const CCFunction<double, 3>& x,
const CCFunction<double, 3>& y,
496 const real_convolution_6d* Gscreen = NULL)
const;
504 make_xy_gf_ab(
const CCFunction<double, 3>& x,
const CCFunction<double, 3>& y,
const CCFunction<double, 3>&
a,
505 const CCFunction<double, 3>&
b)
const;
507 double make_xy_ff_ab(
const CCFunction<double, 3>& x,
const CCFunction<double, 3>& y,
508 const CCFunction<double, 3>&
a,
const CCFunction<double, 3>&
b)
const {
509 error(
"xy_ff_ab not yet implemented");
516 apply_gf(World& world,
const real_function_3d&
f,
const Info& info);
522 make_xy_op_u(
const CCFunction<double, 3>& x,
const CCFunction<double, 3>& y,
523 const CCConvolutionOperator<double, 3>&
op,
524 const std::vector<CCPairFunction<double, 6>>&
u);
530 make_xy_u(
const CCFunction<double, 3>& x,
const CCFunction<double, 3>& y,
531 const std::vector<CCPairFunction<double, 6>>&
u);
538 make_xy_op_u(
const CCFunction<double, 3>& x,
const CCFunction<double, 3>& y,
539 const CCConvolutionOperator<double, 3>&
op,
540 const CCPairFunction<double, 6>&
u);
549 make_xy_op_ab(
const CCFunction<double, 3>& x,
const CCFunction<double, 3>& y,
550 const CCConvolutionOperator<double, 3>&
op,
const CCFunction<double, 3>&
a,
551 const CCFunction<double, 3>&
b)
const;
556 static std::vector<CCPairFunction<double, 6>>
557 get_pair_function(
const Pairs<CCPair>& pairs,
const size_t i,
const size_t j);
562 apply_s2b_operation(World& world,
const CCFunction<double, 3>& bra,
const CCPairFunction<double, 6>&
u,
563 const size_t particle,
const Info& info);
571 static std::vector<CCPairFunction<double, 6>>
swap_particles(
const std::vector<CCPairFunction<double, 6>>&
f) {
572 std::vector<CCPairFunction<double, 6>> swapped;
573 for (
size_t i = 0; i <
f.size(); i++) swapped.push_back(
f[i].swap_particles());
581 overlap(
const CCPairFunction<double, 6>&
f1,
const CCPairFunction<double, 6>&
f2)
const {
582 return inner(
f1,
f2, nemo_->ncf->square());
589 overlap(
const CCPair& x)
const;
598 apply_projector(
const CC_vecfunction&
f,
const CC_vecfunction& ket_)
const;
602 apply_Q12t(
const real_function_6d&
f,
const CC_vecfunction& t)
const;
611 apply_Qt(
const CC_vecfunction&
f,
const CC_vecfunction& ket_,
const double c = 1.0)
const;
615 CCPairFunction<double, 6>
616 apply_Qt(
const CCPairFunction<double, 6>&
f,
const CC_vecfunction& t,
const size_t particle,
617 const double c = 1.0)
const;
628 CCPairFunction<double, 6>
629 apply_Ot(
const CCPairFunction<double, 6>&
f,
const CC_vecfunction& t,
const size_t particle)
const;
635 apply_G(
const CCPairFunction<double, 6>&
u,
const real_convolution_6d&
G)
const;
638 real_function_6d apply_G(
const real_function_6d&
f,
const real_convolution_6d&
G)
const {
639 CCTimer time(world,
"Apply Greens Operator");
641 time.info(
true, result.norm2());
652 get_CC2_singles_potential_gs(World& world,
const CC_vecfunction& singles,
const Pairs<CCPair>& doubles,
659 get_CCS_potential_ex(World& world,
const CC_vecfunction& x,
const bool print, Info& info);
664 get_CC2_singles_potential_ex(World& world,
const CC_vecfunction& gs_singles,
665 const Pairs<CCPair>& gs_doubles,
const CC_vecfunction& ex_singles,
666 const Pairs<CCPair>& response_doubles, Info& info);
671 get_ADC2_singles_potential(World& world,
const Pairs<CCPair>& gs_doubles,
672 CC_vecfunction& ex_singles,
const Pairs<CCPair>& response_doubles, Info& info);
684 potential_energy_gs(World& world,
const CC_vecfunction& bra,
const CC_vecfunction& singles,
685 const Pairs<CCPair>& doubles,
const PotentialType& name)
const;
696 static std::tuple<madness::vector_real_function_3d, madness::vector_real_function_3d>
697 potential_singles_gs(World& world,
const std::vector<int>& result_index,
const CC_vecfunction& singles,
698 const Pairs<CCPair>& doubles,
699 const PotentialType& name,
const Info& info);
713 potential_energy_ex(World& world,
const CC_vecfunction& bra,
const CC_vecfunction& singles_gs,
714 const Pairs<CCPair>& doubles_gs,
const CC_vecfunction& singles_ex,
715 const Pairs<CCPair>& doubles_ex,
const PotentialType& name)
const;
728 static std::tuple<madness::vector_real_function_3d, madness::vector_real_function_3d>
729 potential_singles_ex(World& world,
const std::vector<int> result_index,
const CC_vecfunction& singles_gs,
730 const Pairs<CCPair>& doubles_gs,
const CC_vecfunction& singles_ex,
731 const Pairs<CCPair>& doubles_ex,
const PotentialType& name,
const Info& info);
738 fock_residue_closed_shell(World& world,
const CC_vecfunction& singles,
const Info& info);
742 K(World& world,
const CCFunction<double, 3>&
f,
const Info& info);
746 static K_macrotask(World& world,
const std::vector<real_function_3d>& mo_ket,
747 const std::vector<real_function_3d>& mo_bra,
const real_function_3d&
f,
748 const CCParameters& parameters);
754 K(
const real_function_6d&
u,
const bool symmetric)
const;
758 static K_macrotask(World& world,
const std::vector<real_function_3d>& mo_ket,
759 const std::vector<real_function_3d>& mo_bra,
760 const real_function_6d&
u,
const bool symmetric,
const CCParameters& parameters);
769 apply_K(
const real_function_6d&
u,
const size_t& particle)
const;
773 static apply_K_macrotask(World& world,
const std::vector<real_function_3d>& mo_ket,
774 const std::vector<real_function_3d>& mo_bra,
775 const real_function_6d&
u,
const size_t& particle,
const CCParameters& parameters);
780 apply_Kf(
const CCFunction<double, 3>& x,
const CCFunction<double, 3>& y)
const;
788 apply_fK(
const CCFunction<double, 3>& x,
const CCFunction<double, 3>& y,
789 const real_convolution_6d* Gscreen = NULL)
const;
793 make_f_xy(
const CCFunction<double, 3>& x,
const CCFunction<double, 3>& y,
794 const real_convolution_6d* Gscreen = NULL)
const;
798 static make_f_xy(World& world,
const CCFunction<double, 3>& x,
const CCFunction<double, 3>& y,
799 const Info& info,
const real_convolution_6d* Gscreen = NULL);
802 static make_f_xy_macrotask(World& world,
const real_function_3d& x_ket,
const real_function_3d& y_ket,
803 const real_function_3d& x_bra,
const real_function_3d& y_bra,
804 const size_t& i,
const size_t& j,
const CCParameters& parameters,
805 const FuncType& x_type,
const FuncType& y_type,
806 const real_convolution_6d* Gscreen = NULL);
812 ccs_unprojected(World& world,
const CC_vecfunction& ti,
const CC_vecfunction& tk,
const Info& info);
815 template <
typename T, std::
size_t NDIM>
816 static std::pair<double, double> residual_stats(
const std::vector<Function<T, NDIM>>&
residual) {
817 if (
residual.size() == 0)
return std::make_pair(0.0, 0.0);
818 World& world =
residual.front().world();
820 double rnorm = 0.0, maxrnorm = 0.0;
821 for (
double&
e : errors) {
822 maxrnorm = std::max(maxrnorm,
e);
825 rnorm = sqrt(rnorm / errors.size());
826 return std::make_pair(rnorm, maxrnorm);
829 static void print_convergence(
const std::string name,
const double rmsresidual,
const double maxresidual,
830 const double energy_diff,
const int iteration) {
831 const std::size_t
bufsize = 255;
834 "convergence of %s in iteration %2d at time %8.1fs: rms/max residual, energy change %.1e %.1e %.1e",
835 name.c_str(), iteration,
wall_time(), rmsresidual, maxresidual,energy_diff);
843 x_s3a(
const CC_vecfunction& x,
const CC_vecfunction& t)
const;
847 x_s3b(
const CC_vecfunction& x,
const CC_vecfunction& t)
const;
851 x_s3c(
const CC_vecfunction& x,
const CC_vecfunction& t)
const;
855 x_s5b(
const CC_vecfunction& x,
const CC_vecfunction& t1,
const CC_vecfunction& t2)
const;
859 x_s5c(
const CC_vecfunction& x,
const CC_vecfunction& t1,
const CC_vecfunction& t2)
const;
863 x_s6(
const CC_vecfunction& x,
const CC_vecfunction& t1,
const CC_vecfunction& t2,
864 const CC_vecfunction& t3)
const;
868 x_s2b(
const CC_vecfunction& x,
const Pairs<CCPair>&
u)
const;
872 x_s2c(
const CC_vecfunction& x,
const Pairs<CCPair>&
u)
const;
876 x_s4a(
const CC_vecfunction& x,
const CC_vecfunction& t,
const Pairs<CCPair>&
u)
const;
880 x_s4b(
const CC_vecfunction& x,
const CC_vecfunction& t,
const Pairs<CCPair>&
u)
const;
884 x_s4c(
const CC_vecfunction& x,
const CC_vecfunction& t,
const Pairs<CCPair>&
u)
const;
900 static std::tuple<madness::vector_real_function_3d, madness::vector_real_function_3d>
901 s2b(World& world, std::vector<int> external_indices,
const CC_vecfunction& singles,
const Pairs<CCPair>& doubles,
const
902 CCPairBuilder& builder,
const Info& info);
917 static std::tuple<vector<Function<double, 3>>, vector<Function<double, 3>>>
918 s2c(World& world, std::vector<int> external_index,
const CC_vecfunction& singles,
const Pairs<CCPair>& doubles,
const
919 CCPairBuilder& builder,
const Info& info);
924 s4a_from_s2b(
const vector_real_function_3d& s2b,
const CC_vecfunction& singles)
const;
935 s4b(World& world, std::vector<int> external_index,
const CC_vecfunction& singles,
const Pairs<CCPair>& doubles,
936 const CCPairBuilder& builder,
const Info& info);
947 s4c(World& world, std::vector<int> external_index,
const CC_vecfunction& singles,
const Pairs<CCPair>& doubles,
948 const CCPairBuilder& builder,
const Info& info);
951 void update_intermediates(
const CC_vecfunction& t) {
952 g12->update_elements(mo_bra_, t);
954 f12->update_elements(mo_bra_, t);
960 void clear_potentials(
const CC_vecfunction& t)
const {
961 if (t.type == RESPONSE) {
962 output(
"Clearing Response Singles-Potentials");
963 get_potentials.clear_response();
966 output(
"Clearing all stored Singles-Potentials");
967 get_potentials.clear_all();
976 std::shared_ptr<Nemo> nemo_;
978 const CCParameters& parameters;
980 CC_vecfunction mo_ket_;
982 CC_vecfunction mo_bra_;
984 std::vector<double> orbital_energies_;
987 std::shared_ptr<CCConvolutionOperator<double, 3>> g12;
989 std::shared_ptr<CCConvolutionOperator<double, 3>> f12;
991 CorrelationFactor corrfac;
993 mutable CCIntermediatePotentials get_potentials;
void plot(const char *filename, const real_function_3d &f)
Definition 3dharmonic.cc:137
Operators for the molecular HF and DFT code.
Definition test_derivative.cc:24
A simple, fixed dimension vector.
Definition vector.h:64
double(* f)(const coord_3d &)
Definition derivatives.cc:54
double(* f1)(const coord_3d &)
Definition derivatives.cc:55
double(* f2)(const coord_3d &)
Definition derivatives.cc:56
const std::size_t bufsize
Definition derivatives.cc:16
std::vector< Spinor > truncate(std::vector< Spinor > arg)
Definition dirac-hatom.cc:499
std::complex< double > inner(const Fcwf &psi, const Fcwf &phi)
Definition fcwf.cc:275
vecfuncT K(vecfuncT &ket, vecfuncT &bra, vecfuncT &vf)
const int maxiter
Definition gygi_soltion.cc:68
static double u(double r, double c)
Definition he.cc:20
void save(World &world, const real_function_6d &f, std::string filename)
Definition helium_exact.cc:364
static double bsh_eps
Definition helium_exact.cc:62
void load_function(World &world, Function< double, NDIM > &pair, const std::string name)
Definition helium_mp2.cc:407
Tensor< double > op(const Tensor< double > &x)
Definition kain.cc:508
void print(const tensorT &t)
Definition mcpfit.cc:140
Namespace for all elements and tools of MADNESS.
Definition DFParameters.h:10
std::vector< double > norm2s(World &world, const std::vector< Function< T, NDIM > > &v)
Computes the 2-norms of a vector of functions.
Definition vmra.h:827
Function< TENSOR_RESULT_TYPE(Q, T), NDIM > mul(const Q alpha, const Function< T, NDIM > &f, bool fence=true)
Returns new function equal to alpha*f(x) with optional fence.
Definition mra.h:1733
std::enable_if_t< NDIM%2==0, Function< T, NDIM > > swap_particles(const Function< T, NDIM > &f)
swap particles 1 and 2
Definition mra.h:2334
std::vector< real_function_3d > vector_real_function_3d
Definition functypedefs.h:94
Function< double, 6 > real_function_6d
Definition functypedefs.h:83
void print_size(World &world, const std::vector< Function< T, NDIM > > &v, const std::string &msg="vectorfunction")
Definition vmra.h:1688
double wall_time()
Returns the wall time in seconds relative to an arbitrary origin.
Definition timers.cc:48
Function< double, 3 > real_function_3d
Definition functypedefs.h:80
static XNonlinearSolver< std::vector< Function< T, NDIM > >, T, vector_function_allocator< T, NDIM > > nonlinear_vector_solver(World &world, const long nvec)
Definition nonlinsol.h:284
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 d
Definition nonlinschro.cc:121
static const double a
Definition nonlinschro.cc:118
void error(const char *msg, int code)
Definition oldtest.cc:57
static const double c
Definition relops.cc:10
static double V(const coordT &r)
Definition tdse.cc:288
InputParameters param
Definition tdse.cc:203
void e()
Definition test_sig.cc:75
F residual(const F &f)
Definition testcomplexfunctionsolver.cc:69
void test()
Definition y.cc:696