49 const UList<scalar>&
re,
50 const UList<scalar>& im
53 const label len = result.size();
56 if (len !=
re.size() || len != im.size())
59 <<
"Components sizes do not match: " << len <<
" (" 60 <<
re.size() <<
' ' << im.size() <<
')' 66 for (label i=0; i < len; ++i)
68 result[i].Re() =
re[i];
69 result[i].Im() = im[i];
76 const UList<complex>&
input,
81 const label len =
input.size();
84 if (len !=
re.size() || len != im.size())
87 <<
"Components sizes do not match: " << len <<
" (" 88 <<
re.size() <<
' ' << im.size() <<
')' 94 for (label i=0; i < len; ++i)
97 im[i] =
input[i].Im();
106 const UList<scalar>&
re,
107 const UList<scalar>& im
152 sf[i] = cf[i].Re() + cf[i].Im();
void divide(FieldField< Field, Type > &f, const FieldField< Field, Type > &f1, const FieldField< Field, scalar > &f2)
dimensionedScalar tanh(const dimensionedScalar &ds)
void size(const label n)
Older name for setAddressableSize.
dimensionedScalar acos(const dimensionedScalar &ds)
#define BINARY_OPERATOR(ReturnType, Type1, Type2, Op, OpName, OpFunc)
void multiply(FieldField< Field, Type > &f, const FieldField< Field, Type > &f1, const FieldField< Field, scalar > &f2)
dimensionedScalar log(const dimensionedScalar &ds)
addCompoundToRunTimeSelectionTable(List< complex >, complexList)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
#define UNARY_FUNCTION(ReturnType, Type1, Func, Dfunc)
defineCompoundTypeName(List< complex >, complexList)
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Field< complex > complexField
Specialisation of Field<T> for complex.
const dimensionedScalar re
Classical electron radius: default SI units: [m].
constexpr char nl
The newline '\n' character (0x0a)
void zip(FieldField< Field, SphericalTensor< Cmpt >> &result, const FieldField< Field, Cmpt > &ii)
Zip together sphericalTensor field field from components.
dimensionedScalar sqrt(const dimensionedScalar &ds)
dimensionedScalar pow025(const dimensionedScalar &ds)
complexField ImComplexField(const UList< scalar > &im)
Create complex field from a list of imag (using real == 0)
void subtract(FieldField< Field1, typename typeOfSum< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
dimensionedScalar asin(const dimensionedScalar &ds)
dimensionedScalar pow5(const dimensionedScalar &ds)
complexField ComplexField(const UList< scalar > &re, const UList< scalar > &im)
Zip up two lists of values into a list of complex.
Macros for easy insertion into run-time selection tables.
complex sumProd(const UList< complex > &f1, const UList< complex > &f2)
Sum product.
#define forAll(list, i)
Loop across all elements in list.
void unzip(const FieldField< Field, SphericalTensor< Cmpt >> &input, FieldField< Field, Cmpt > &ii)
Unzip sphericalTensor field field into components.
dimensionedScalar acosh(const dimensionedScalar &ds)
dimensionedScalar cos(const dimensionedScalar &ds)
dimensionedScalar exp(const dimensionedScalar &ds)
scalarField Im(const UList< complex > &cf)
Extract imag component.
Generic templated field type.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
dimensionedScalar asinh(const dimensionedScalar &ds)
static Istream & input(Istream &is, IntRange< T > &range)
scalarField Re(const UList< complex > &cf)
Extract real component.
dimensionedScalar atanh(const dimensionedScalar &ds)
errorManip< error > abort(error &err)
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
dimensionedScalar sin(const dimensionedScalar &ds)
void add(FieldField< Field1, typename typeOfSum< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
#define TFOR_ALL_S_OP_F_OP_F(typeS, s, OP1, typeF1, f1, OP2, typeF2, f2)
scalarField ReImSum(const UList< complex > &cf)
Sum real and imag components.
dimensionedScalar pow3(const dimensionedScalar &ds)
dimensionedScalar sinh(const dimensionedScalar &ds)
dimensionedScalar atan(const dimensionedScalar &ds)
dimensionedScalar pow4(const dimensionedScalar &ds)
dimensionedScalar pow6(const dimensionedScalar &ds)
A complex number, similar to the C++ complex type.
complexField ReComplexField(const UList< scalar > &re)
Create complex field from a list of real (using imag == 0)
dimensionedScalar cosh(const dimensionedScalar &ds)
dimensionedScalar tan(const dimensionedScalar &ds)
#define BINARY_TYPE_OPERATOR(ReturnType, Type1, Type2, Op, OpName, OpFunc)
dimensionedScalar log10(const dimensionedScalar &ds)
static constexpr const zero Zero
Global zero (0)