45 topOInterpolationFunction,
59 if (solutionD[idir] == -1)
61 averageVol /=
bounds.span()[idir];
67 scalar multMeanRadius =
70 "meanRadiusMult", {{
"scale", 2306}}, 2
73 <<
"Computed near-band width :: " << width
74 <<
" and multiplying with " << multMeanRadius <<
endl;
76 return multMeanRadius*width;
82sigmoidalHeaviside::sigmoidalHeaviside
103 const scalar t(timeValue == 0 ? 1. : timeValue);
109 res =
max(
min(scalar(1), res), scalar(0));
118 const scalar t(timeValue == 0 ? 1. : timeValue);
122 <<
type() <<
"::derivative:: t, dNB " << t <<
", " <<
dNB_ <<
endl;
constexpr scalar pi(M_PI)
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
scalar timeOutputValue() const
Return the current user-time value. (ie, after applying any timeToUserTime() conversion).
void size(const label n)
Older name for setAddressableSize.
Templated 3D Vector derived from VectorSpace adding construction from 3 components,...
A bounding box defined in terms of min/max extrema points.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
T getOrDefaultCompat(const word &keyword, std::initializer_list< std::pair< const char *, int > > compat, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a T, or return the given default value using any compatibility names if needed.
Mesh data needed to do the Finite Volume discretisation.
const Time & time() const
Return the top-level database.
label nGeometricD() const
Return the number of valid geometric dimensions in the mesh.
A smooth Heaviside function to project the signed distance field in level set topology optimization.
virtual tmp< scalarField > derivative(const scalarField &arg) const
Return of function with respect to the argument field.
virtual void interpolate(const scalarField &arg, scalarField &res) const
Interpolate argument to result.
scalar computeNearBandWidth() const
Compute the near-band width of the fluid-solid interface as.
scalar dNB_
The near-band distance.
A class for managing temporary objects.
static tmp< T > New(Args &&... args)
Construct tmp with forwarding arguments.
T & ref() const
Return non-const reference to the contents of a non-null managed pointer.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
#define DebugInfo
Report an information message using Foam::Info.
Namespace for bounding specifications. At the moment, mostly for tables.
constexpr scalar pi(M_PI)
Type gAverage(const FieldField< Field, Type > &f, const label comm)
The global arithmetic average of a FieldField.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
dimensionedScalar sin(const dimensionedScalar &ds)
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
Ostream & endl(Ostream &os)
Add newline and flush stream.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
static constexpr const zero Zero
Global zero (0).
dimensionedScalar cos(const dimensionedScalar &ds)
#define forAll(list, i)
Loop across all elements in list.