54 scalar l0(
K.sizeOfBox()[0]*(scalar(
K.nn()[0])/(scalar(
K.nn()[0])-1.0)));
62 y /= scalar(
K.size());
77 const label tnp =
Ek.size();
78 const label NoSubintervals = label
80 pow(scalar(tnp), 1.0/vector::dim)*
pow(1.0/vector::dim, 0.5) - 0.5
87 scalar kmax =
K.max()*
pow(1.0/vector::dim,0.5);
88 scalar delta_k = kmax/(NoSubintervals);
92 k1D[a] = (a + 1)*delta_k;
99 scalar kmag =
mag(
K[l]);
101 for (label a=0; a<NoSubintervals; a++)
105 kmag <= ((a + 1)*delta_k + delta_k/2.0)
106 && kmag > ((a + 1)*delta_k - delta_k/2.0)
109 scalar dist = delta_k/2.0 -
mag((a + 1)*delta_k - kmag);
127 for (label a=0; a<NoSubintervals; a++)
131 Ek1D[a] /= EWeight[a];
135 return graph(
"E(k)",
"k",
"E(k)", k1D, Ek1D);
Field< complexVector > complexVectorField
Specialisation of Field<T> for complexVector.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
dimensionedSymmTensor sqr(const dimensionedVector &dv)
autoPtr< Function1< scalar > > Ek(Function1< scalar >::New("Ek", dict, &runTime))
CGAL::Exact_predicates_exact_constructions_kernel K
#define forAll(list, i)
Loop across all elements in list.
Class to create, store and output qgraph files.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
graph kShellMean(const complexVectorField &Ek, const Kmesh &K)
constexpr scalar pi(M_PI)
iterator begin()
iterator set to the beginning of the HashTable
Calculate the wavenumber vector field corresponding to the space vector field of a finite volume mesh...
Integrate a multi-dimensional complexVectorField in k-shells to create the 1D.
graph kShellIntegration(const complexVectorField &Ek, const Kmesh &K)
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
const scalarField & x() const
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)