MCPcopy Create free account
hub / github.com/BLAST-WarpX/warpx / BreitWheelerGenerateTable

Method BreitWheelerGenerateTable

Source/Particles/MultiParticleContainer.cpp:1499–1581  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1497}
1498
1499void
1500MultiParticleContainer::BreitWheelerGenerateTable ()
1501{
1502 const ParmParse pp_qed_bw("qed_bw");
1503 std::string table_name;
1504 pp_qed_bw.query("save_table_in", table_name);
1505 WARPX_ALWAYS_ASSERT_WITH_MESSAGE(
1506 !table_name.empty(),
1507 "qed_bw.save_table_in should be provided!");
1508
1509 // bw_minimum_chi_phot is the minimum chi parameter to be
1510 // considered for pair production. If a photon has chi < chi_min,
1511 // the optical depth is not evolved and photon generation is ignored
1512 amrex::Real bw_minimum_chi_part = 0;
1513 utils::parser::getWithParser(pp_qed_bw, "chi_min", bw_minimum_chi_part);
1514
1515 if(ParallelDescriptor::IOProcessor()){
1516 PicsarBreitWheelerCtrl ctrl;
1517
1518 //==Table parameters==
1519
1520 //--- sub-table 1 (1D)
1521 //These parameters are used to pre-compute a function
1522 //which appears in the evolution of the optical depth
1523
1524 //Minimun chi for the table. If a photon has chi < tab_dndt_chi_min,
1525 //an analytical approximation is used.
1526 utils::parser::getWithParser(
1527 pp_qed_bw, "tab_dndt_chi_min", ctrl.dndt_params.chi_phot_min);
1528
1529 //Maximum chi for the table. If a photon has chi > tab_dndt_chi_max,
1530 //an analytical approximation is used.
1531 utils::parser::getWithParser(
1532 pp_qed_bw, "tab_dndt_chi_max", ctrl.dndt_params.chi_phot_max);
1533
1534 //How many points should be used for chi in the table
1535 utils::parser::getWithParser(
1536 pp_qed_bw, "tab_dndt_how_many", ctrl.dndt_params.chi_phot_how_many);
1537 //------
1538
1539 //--- sub-table 2 (2D)
1540 //These parameters are used to pre-compute a function
1541 //which is used to extract the properties of the generated
1542 //particles.
1543
1544 //Minimun chi for the table. If a photon has chi < tab_pair_chi_min
1545 //chi is considered as it were equal to chi_phot_tpair_min
1546 utils::parser::getWithParser(
1547 pp_qed_bw, "tab_pair_chi_min", ctrl.pair_prod_params.chi_phot_min);
1548
1549 //Maximum chi for the table. If a photon has chi > tab_pair_chi_max
1550 //chi is considered as it were equal to chi_phot_tpair_max
1551 utils::parser::getWithParser(
1552 pp_qed_bw, "tab_pair_chi_max", ctrl.pair_prod_params.chi_phot_max);
1553
1554 //How many points should be used for chi in the table
1555 utils::parser::getWithParser(
1556 pp_qed_bw, "tab_pair_chi_how_many", ctrl.pair_prod_params.chi_phot_how_many);

Callers

nothing calls this directly

Calls 7

getWithParserFunction · 0.85
queryMethod · 0.80
dataMethod · 0.80
sizeMethod · 0.80
compute_lookup_tablesMethod · 0.45

Tested by

no test coverage detected