58 return "points0MotionSolver " +
name();
93 <<
"compile " << name_ <<
" sha1: " << context.
sha1() <<
endl;
100 "-I$(LIB_SRC)/finiteVolume/lnInclude \\\n"
101 "-I$(LIB_SRC)/meshTools/lnInclude \\\n"
102 "-I$(LIB_SRC)/dynamicMesh/lnInclude \\\n"
103 "-I$(LIB_SRC)/fvMotionSolvers/lnInclude \\\n"
105 +
"\n\nLIB_LIBS = \\\n"
106 " -lfiniteVolume \\\n"
108 " -ldynamicMesh \\\n"
109 " -lfvMotionSolvers \\\n"
125 name_(
dict.getCompat<
word>(
"name", {{
"redirectType", 1706}})),
126 redirectMotionSolverPtr_(
nullptr)
128 updateLibrary(name_);
138 if (!redirectMotionSolverPtr_)
144 constructDict.set(
"solver", name_);
145 constructDict.set(
"motionSolver", name_);
157 return *redirectMotionSolverPtr_;
184 updateLibrary(name_);
185 return redirectMotionSolver().updateMesh(mpm);
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
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...
@ NO_READ
Nothing to be read.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
dlLibraryTable & libs() const noexcept
Mutable access to the loaded dynamic libraries.
Base class for function objects and boundary conditions using dynamic code that provides methods for ...
void updateLibrary(const word &name, const dynamicCodeContext &context) const
Update library as required, using the given context.
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.
virtual void prepare(dynamicCode &, const dynamicCodeContext &) const
Adapt the context for the current object.
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.
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,...
T getCompat(const word &keyword, std::initializer_list< std::pair< const char *, int > > compat, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a T using any compatibility names if needed. FatalIOError if not found,...
entry * set(entry *entryPtr)
Assign a new entry, overwriting any existing entry.
A table of dynamically loaded libraries.
Encapsulation of dynamic code dictionaries.
const string & libs() const noexcept
The code libs (LIB_LIBS).
const SHA1 & sha1() const noexcept
The SHA1 calculated from options, libs, include, code, etc.
const string & options() const noexcept
The code options (Make/options).
Tools for handling dynamic code compilation.
void addCopyFile(const fileName &name)
Add a file template name, which will be found and filtered.
void setFilterVariable(const word &key, const std::string &value)
Define a filter variable.
void addCompileFile(const fileName &name)
Add a file template name, which will be found and filtered.
void setMakeOptions(const std::string &content)
Define contents for Make/options.
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.
static autoPtr< motionSolver > New(const polyMesh &)
Select constructed from polyMesh.
motionSolver(const polyMesh &mesh)
Construct from polyMesh.
const dictionary & coeffDict() const
Const access to the coefficients dictionary.
const Time & time() const noexcept
Return time registry.
Mesh consisting of general polyhedral cells.
A class for handling character strings derived from std::string.
A class for managing temporary objects.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
const word GlobalIOList< Tuple2< scalar, vector > >::typeName("scalarVectorTable")
Ostream & endl(Ostream &os)
Add newline and flush stream.
vectorField pointField
pointField is a vectorField.