DamarisWriter.hpp
Go to the documentation of this file.
208 // this function writes the mesh data directly to Damaris shared memory using Opm::DamarisOutput::DamarisVar objects.
211 // Currently by default we assume a static mesh grid (the geometry unchanging through the simulation)
238 if (dataCol.data<double>().size() >= static_cast<std::vector<double>::size_type>(this->numElements_)) {
241 OpmLog::info(fmt::format("( rank:{}) The variable \"{}\" was found to be of a different size {} (not {}).", rank_, name, dataCol.data<double>().size(), this->numElements_ ));
246 if (dataCol.data<int>().size() >= static_cast<std::vector<int>::size_type>(this->numElements_)) {
249 OpmLog::info(fmt::format("( rank:{}) The variable \"{}\" was found to be of a different size {} (not {}).", rank_, name, dataCol.data<int>().size(), this->numElements_ ));
258 OpmLog::info(fmt::format("( rank:{}) No simulation data written to the Damaris server - check --damaris-limit-variables command line option (if used) has valid variable name(s) and that the Damaris XML file contains variable names that are available in your simulation.", rank_));
260 OpmLog::debug(fmt::format("( rank:{}) {} Damaris Variables written to the Damaris servers", rank_, cell_data_written));
271 std::cout << "Name of Damaris Block Varaiable : (" << rank_ << ") " << name << " part : " << part << " Value : " << dataCol << std::endl ;
313 // variable directly in the shared memory region and do not use damaris_write() to copy data there.
356 OpmLog::error(fmt::format("ERORR: rank {} The DUNE geometry grid has polyhedral elements - These elements are currently not supported.", rank_ ));
359 // This is the template XML model for x,y,z coordinates defined in initDamarisXmlFile.cpp which is used to
362 // <parameter name="n_coords_global" type="int" value="1" comment="only needed if we need to write to HDF5 in Collective mode"/>
363 // <layout name="n_coords_layout" type="double" dimensions="n_coords_local" comment="For the individual x, y and z coordinates of the mesh vertices" />
365 // <variable name="x" layout="n_coords_layout" type="scalar" visualizable="false" unit="m" script="PythonConduitTest" time-varying="false" />
366 // <variable name="y" layout="n_coords_layout" type="scalar" visualizable="false" unit="m" script="PythonConduitTest" time-varying="false" />
367 // <variable name="z" layout="n_coords_layout" type="scalar" visualizable="false" unit="m" script="PythonConduitTest" time-varying="false" />
382 // Now we can use the shared memory area that Damaris has allocated and use it to write the x,y,z coordinates
386 // This is the template XML model for connectivity, offsets and types, as defined in initDamarisXmlFile.cpp which is used to
389 // <layout name="n_connections_layout_ph" type="int" dimensions="n_connectivity_ph" comment="Layout for connectivities " />
391 // <layout name="n_offsets_layout_ph" type="int" dimensions="n_offsets_types_ph+1" comment="Layout for the offsets_ph" />
392 // <layout name="n_types_layout_ph" type="char" dimensions="n_offsets_types_ph" comment="Layout for the types_ph " />
394 // <variable name="connectivity" layout="n_connections_layout_ph" type="scalar" visualizable="false" unit="" script="PythonConduitTest" time-varying="false" />
395 // <variable name="offsets" layout="n_offsets_layout_ph" type="scalar" visualizable="false" unit="" script="PythonConduitTest" time-varying="false" />
396 // <variable name="types" layout="n_types_layout_ph" type="scalar" visualizable="false" unit="" script="PythonConduitTest" time-varying="false" />
486 OPM_END_PARALLEL_TRY_CATCH("DamarisWriter::prepareLocalCellData() failed: ", simulator_.vanguard().grid().comm());
#define OPM_END_PARALLEL_TRY_CATCH(prefix, comm) Catch exception and throw in a parallel try-catch clause. Definition: DeferredLoggingErrorHelpers.hpp:192 #define OPM_BEGIN_PARALLEL_TRY_CATCH() Macro to setup the try of a parallel try-catch. Definition: DeferredLoggingErrorHelpers.hpp:158 Allows model geometry data to be passed to external code - via a copy direct to input pointers. const std::vector< int > & localIdxToGlobalIdxMapping() const Definition: CollectDataOnIORank.hpp:133 Definition: DamarisVar.hpp:101 Collects necessary output values and pass them to Damaris server processes. Definition: DamarisWriter.hpp:90 void writeOutput(data::Solution &localCellData, bool isSubStep) Writes localCellData through to Damaris servers. Sets up the unstructured mesh which is passed to Dam... Definition: DamarisWriter.hpp:172 static void registerParameters() Definition: DamarisWriter.hpp:106 DamarisWriter(Simulator &simulator) Definition: DamarisWriter.hpp:114 Definition: EclGenericWriter.hpp:65 CollectDataOnIORankType collectOnIORank_ Definition: EclGenericWriter.hpp:152 std::unique_ptr< EclipseIO > eclIO_ Definition: EclGenericWriter.hpp:157 Manages the initializing and running of time dependent problems. Definition: simulator.hh:92 Vanguard & vanguard() Return a reference to the grid manager of simulation. Definition: simulator.hh:260 const GridView & gridView() const Return the grid view for which the simulation is done. Definition: simulator.hh:272 Model & model() Return the physical model used in the simulation. Definition: simulator.hh:278 int endIteration() int setParameter(const char *field, int value) int write(const char *field, const void *data) int setPosition(const char *field, int64_t pos) void handleError(const int dam_err, Parallel::Communication comm, const std::string &message) int setupWritingPars(Parallel::Communication comm, const int n_elements_local_grid, std::vector< unsigned long long > &elements_rank_offsets) ConnectivityVertexOrder Definition: GridDataOutput.hpp:93 Dune::Communication< MPIComm > Communication Definition: ParallelCommunication.hpp:30 std::size_t countLocalInteriorCellsGridView(const GridView &gridView) Get the number of local interior cells in a grid view. Definition: countGlobalCells.hpp:47 Definition: blackoilboundaryratevector.hh:37 void eclBroadcast(Parallel::Communication, T &) typename Properties::Detail::GetPropImpl< TypeTag, Property >::type::type GetPropType get the type alias defined in the property (equivalent to old macro GET_PROP_TYPE(.... Definition: propertysystem.hh:235 |