74#ifndef codedPoints0MotionSolver_H
75#define codedPoints0MotionSolver_H
135 =
"codedPoints0MotionSolverTemplate.C";
139 =
"codedPoints0MotionSolverTemplate.H";
169 virtual void solve();
Info<< nl;Info<< "Write faMesh in vtk format:"<< nl;{ vtk::uindirectPatchWriter writer(aMesh.patch(), fileName(aMesh.time().globalPath()/vtkBaseFileName));writer.writeGeometry();globalIndex procAddr(aMesh.nFaces());labelList cellIDs;if(UPstream::master()) { cellIDs.resize(procAddr.totalSize());for(const labelRange &range :procAddr.ranges()) { auto slice=cellIDs.slice(range);slice=identity(range);} } writer.beginCellData(4);writer.writeProcIDs();writer.write("cellID", cellIDs);writer.write("area", aMesh.S().field());writer.write("normal", aMesh.faceAreaNormals());writer.beginPointData(1);writer.write("normal", aMesh.pointAreaNormals());Info<< " "<< writer.output().name()<< nl;}{ vtk::lineWriter writer(aMesh.points(), aMesh.edges(), fileName(aMesh.time().globalPath()/(vtkBaseFileName+"-edges")));writer.writeGeometry();writer.beginCellData(4);writer.writeProcIDs();{ Field< scalar > fld(faMeshTools::flattenEdgeField(aMesh.magLe(), true))
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Base class for function objects and boundary conditions using dynamic code that provides methods for ...
codedBase(const codedBase &)=delete
No copy construct.
Provides a general interface to enable dynamic code compilation of mesh motion solvers.
virtual tmp< pointField > curPoints() const
Return point location obtained from the current motion field.
codedPoints0MotionSolver(const codedPoints0MotionSolver &)=delete
No copy construct.
void operator=(const codedPoints0MotionSolver &)=delete
No copy assignment.
virtual void prepare(dynamicCode &, const dynamicCodeContext &) const
Adapt the context for the current object.
virtual ~codedPoints0MotionSolver()=default
Destructor.
word name_
Name of redirected motion solver.
virtual void movePoints(const pointField &fld)
Update local data for geometry changes.
motionSolver & redirectMotionSolver() const
Dynamically compiled motionSolver.
TypeName("coded")
Runtime type information.
autoPtr< motionSolver > redirectMotionSolverPtr_
Underlying motionSolver.
virtual void updateMesh(const mapPolyMesh &mpm)
Update local data for topology changes.
static constexpr const char *const codeTemplateC
Name of the C code template to be used.
virtual const dictionary & codeDict() const
virtual void clearRedirect() const
Clear redirected object(s).
static constexpr const char *const codeTemplateH
Name of the H code template to be used.
virtual dlLibraryTable & libs() const
Mutable access to the loaded dynamic libraries.
virtual void solve()
Solve for motion.
virtual string description() const
Description (type + name) for the output.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
A table of dynamically loaded libraries.
Encapsulation of dynamic code dictionaries.
Tools for handling dynamic code compilation.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Virtual base class for mesh motion solver.
const polyMesh & mesh() const
Return reference to mesh.
motionSolver(const polyMesh &mesh)
Construct from polyMesh.
Mesh consisting of general polyhedral cells.
A class for managing temporary objects.
A class for handling words, derived from Foam::string.
vectorField pointField
pointField is a vectorField.
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.