46 const UList<vector>& realValues,
47 const UList<vector>& imagValues
50 const label len = result.size();
53 if (len != realValues.size() || len != imagValues.size())
56 <<
"Components sizes do not match: " << len <<
" (" 57 << realValues.size() <<
' ' << imagValues.size() <<
')' <<
nl 62 for (label i=0; i < len; ++i)
64 result[i] =
Foam::zip(realValues[i], imagValues[i]);
72 const UList<vector>& realValues,
76 const label len = result.size();
79 if (len != realValues.size())
82 <<
"Components sizes do not match: " << len <<
" != " 83 << realValues.size() <<
nl 88 for (label i=0; i < len; ++i)
90 result[i] =
Foam::zip(realValues[i], imagValue);
99 const UList<vector>& imagValues
102 const label len = result.size();
105 if (len != imagValues.size())
108 <<
"Components sizes do not match: " << len <<
" != " 109 << imagValues.size() <<
nl 114 for (label i=0; i < len; ++i)
116 result[i] =
Foam::zip(realValue, imagValues[i]);
123 const UList<vector>& realValues,
124 const UList<vector>& imagValues
137 const UList<vector>& realValues,
152 const UList<vector>& imagValues
157 Foam::zip(result, realValue, imagValues);
174 return vector(
c.x().cmptSum(),
c.y().cmptSum(),
c.z().cmptSum());
193 return vector(
c.x().real(),
c.y().real(),
c.z().real());
212 return vector(
c.x().imag(),
c.y().imag(),
c.z().imag());
222 const UList<vector>& vec,
223 const UList<complexVector>& cmplx
226 const label len = cmplx.
size();
229 if (len != vec.size())
232 <<
"Parameter sizes do not match: " << vec.size()
233 <<
" != " << len <<
nl 240 for (label i=0; i < len; ++i)
242 result[i] = (vec[i] ^ cmplx[i]);
Field< complexVector > complexVectorField
Specialisation of Field<T> for complexVector.
void size(const label n)
Older name for setAddressableSize.
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.
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...
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.
scalarField ReImSum(const UList< complex > &cmplx)
Sum real and imag components.
Macros for easy insertion into run-time selection tables.
scalarField Im(const UList< complex > &cmplx)
Extract imag component.
Vector< complex > complexVector
A Vector of complex values with 'scalar' precision.
complexField ComplexField(const UList< scalar > &realValues, const UList< scalar > &imagValues)
Create complex field by zipping two lists of real/imag values.
errorManip< error > abort(error &err)
scalarField Re(const UList< complex > &cmplx)
Extract real component.
const dimensionedScalar c
Speed of light in a vacuum.
Field< vector > vectorField
Specialisation of Field<T> for vector.
dimensionSet transform(const dimensionSet &ds)
Return the argument; transformations do not change the dimensions.