25 namespace MD = MultiDimensional;
27 FormFactorBase::FormFactorBase() :
28 _errPrefixGroup{
"",
""},
39 _errPrefixGroup(other._errPrefixGroup),
40 _FFErrLabel(other._FFErrLabel),
42 _FFErrNames(other._FFErrNames),
44 _units{other._units} {
45 for(
auto& elem: other._tensorList) {
46 addTensor(Tensor{elem});
69 for(
size_t pos = 0ul; pos <
_FFErrNames.size(); ++pos) {
71 if (it != errDict.end()) {
72 result[pos+1] = it->second;
81 for (
size_t pos = 0ul; pos <
_FFErrNames.size(); ++pos) {
100 if (!data || data->rank() == 0) {
103 for (
IndexType i = 0; i < values.size(); ++i) {
104 data->element({i}) = values[i];
134 elem.first.group = name;
150 addSetting<string>(
"Units", name);
155 auto mc = getSetting<string>(
"Hammer",
"Units");
159 throw Error(
"Hammer units not found. Mars Climate Orbiter would like a word.");
168 auto oldsize = newdims.size();
169 newdims.reserve(2 * oldsize);
170 newlabs.reserve(2 * oldsize);
171 copy_n(newdims.begin(), oldsize, back_inserter(newdims));
172 transform_n(newlabs.begin(), oldsize, back_inserter(newlabs),
175 newdims.push_back(static_cast<IndexType>(intPoints.size()));
177 for (
IndexType i = 0; i < intPoints.size(); ++i) {
Tensor & outerSquare()
creates a tensor with twice the rank by multiplying the tensor with its hermitean conjugate ...
TensorData makeEmptySparse(const IndexList &dimensions, const LabelsList &labels)
Tensor & addAt(const Tensor &t, IndexLabel coord, IndexType position)
add a tensor of rank N-1 to a specific position in a specific coordinate the dimension of the tensor ...
LabelsList labels() const
get the labels of all the indices at once
Non-sparse tensor data container.
Tensor indices label definitions.
Hammer class for dealing with units.
Base class to access the settings repository.
std::shared_ptr< IContainer > SharedTensorData
static Log & getLog(const std::string &name)
Get a logger with the given name.
_OutputIterator transform_n(_InputIterator __first, size_t __n, _OutputIterator __result, _UnaryOperation __op)
Sparse tensor data container.
Order-0 tensor data container.
static Units & instance()
IndexLabel
label identifiers of tensor indices they are used to determine which indices can be contracted togeth...
Multidimensional tensor class with complex numbers as elements.
SettingsHandler * getSettingsHandler() const
provide the pointer to the repository handler
size_t _signatureIndex
the index of the current signature
TensorData makeEmptyVector(const IndexList &dimensions, const LabelsList &labels)
IndexList dims() const
get the dimensions of all the indices at once
void addProcessSignature(PdgId parent, const std::vector< PdgId > &daughters, const std::vector< PdgId > &subDaughters={})
adds a signature to the list by specifying the particles PDG codes.
double getUnitsRescalingToMC(std::string mcunits, std::string localunits) const
void updateVectorOfSettings(const std::vector< T > &values, const std::vector< std::string > &names, const std::string &path="", WTerm group=WTerm::COMMON)
std::vector< std::vector< double >> EvaluationGrid
PDG code process signature class.