48template<
class GeoFieldType>
55 if (
io &&
io->isHeaderClass<GeoFieldType>())
57 Info<<
"Reading " <<
io->headerClassName()
58 <<
' ' <<
io->name() <<
endl;
82int main(
int argc,
char *argv[])
86 "Extract force/moment information from simulation results that"
87 " use the lumped points movement description."
93 "Create visualization files of the forces"
102 const bool withVTK =
args.found(
"vtk");
114 Info<<
"No valid movement found" <<
endl;
121 Info<<
"No point patches with lumped movement found" <<
endl;
130 List<vector> forces, moments;
134 runTime.setTime(timeDirs[timei], timei);
138 if (
mesh.readUpdate())
140 Info<<
" Read new mesh" <<
nl;
148 = loadField<volScalarField>(
mesh, objects.findObject(
"p"));
151 if (movement().forcesAndMoments(
mesh, forces, moments))
153 Info<<
"forces per zone: " << forces <<
endl;
154 Info<<
"moments per zone: " << moments <<
endl;
163 movement().writeForcesAndMomentsVTP
178 if (forceSeries.
size())
180 forceSeries.
write(
"forces.vtp");
List of IOobjects with searching and retrieving facilities. Implemented as a HashTable,...
@ MUST_READ
Reading required.
@ AUTO_WRITE
Automatically write from objectRegistry::writeObject().
Defines the attributes of an object for which implicit objectRegistry management is supported,...
static bool master(const label communicator=worldComm)
True if process corresponds to the master rank in the communicator.
static void noFunctionObjects(bool addWithOption=false)
Remove '-noFunctionObjects' option and ignore any occurrences.
static void addBoolOption(const word &optName, const string &usage="", bool advanced=false)
Add a bool option to validOptions with usage information.
static void addNote(const string ¬e)
Add extra notes for the usage information.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
static autoPtr< T > New(Args &&... args)
Construct autoPtr with forwarding arguments.
static autoPtr< lumpedPointIOMovement > New(const objectRegistry &obr, label ownerId=-1)
Create a movement object in the registry by reading system dictionary.
static void addOptions(const bool constant=true, const bool withZero=false)
Add timeSelector options to argList::validOptions.
static instantList select0(Time &runTime, const argList &args)
Return the set of times selected based on the argList options and also set the runTime to the first i...
Provides a means of accumulating and generating VTK file series.
bool append(const fileNameInstant &inst)
Append the specified file instant.
static void write(const fileName &base, const UList< instant > &series, const char sep='_')
Write file series (JSON format) to disk, for specified instances.
label size() const noexcept
The number of data sets.
A class for handling words, derived from Foam::string.
static word printf(const char *fmt, const PrimitiveType &val)
Use a printf-style formatter for a primitive.
word outputName("finiteArea-edges.obj")
messageStream Info
Information stream (stdout output on master, null elsewhere).
List< instant > instantList
List of instants.
Ostream & endl(Ostream &os)
Add newline and flush stream.
constexpr char nl
The newline '\n' character (0x0a).
Foam::argList args(argc, argv)
#define forAll(list, i)
Loop across all elements in list.