38 const word& functionName,
42 polyFitter_(functionName,geomDir),
47 for (
const label dirn : geomDir_)
69 List<T> fitData = polyFitter_.fitData
77 return GradType(fitData[1],fitData[2],fitData[3]);
90 ret[i] = fitData[dimCounter];
117 return GradType(fitData[1],fitData[2],fitData[3]);
120 label dimCounter = 0;
126 if (geomDir_[i] == 1)
129 ret.row(i, fitData[dimCounter]);
142 const Map<List<vector>>& positions,
143 const Map<List<T>>& listValue
148 Map<GradType> gradMap(positions.
capacity());
152 const label
key = iter.key();
153 const List<vector>& positions = iter.val();
155 GradType
grad(this->
grad(positions, listValue[
key]));
typeOfRank< typename pTraits< arg1 >::cmptType, direction(pTraits< arg1 >::rank)+direction(pTraits< arg2 >::rank) >::type type
#define forAll(list, i)
Loop across all elements in list.
outerProduct< vector, T >::type grad(const List< vector > &positions, const List< T > &listValue)
Return the gradient of the cell.
leastSquareGrad(const word &functionName, const labelVector &geomDir)
Construct from components.
label capacity() const noexcept
Size of the underlying storage.
A class for handling words, derived from Foam::string.
Estimates the gradient with a least square scheme in a cell.
auto key(const Type &t) -> typename std::enable_if< std::is_enum< Type >::value, typename std::underlying_type< Type >::type >::type
Tensor of scalars, i.e. Tensor<scalar>.
tmp< GeometricField< typename outerProduct< vector, Type >::type, faPatchField, areaMesh >> grad(const GeometricField< Type, faePatchField, edgeMesh > &ssf)
forAllConstIters(mixture.phases(), phase)
A HashTable to objects of type <T> with a label key.
static constexpr const zero Zero
Global zero (0)