Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
Arcane::DumpWEnsight7 Class Reference

Writes in Ensight7 format. More...

Inheritance diagram for Arcane::DumpWEnsight7:
Collaboration diagram for Arcane::DumpWEnsight7:

Classes

struct  EnsightPart
 Correspondence between Ensight element type and Arcane. More...
struct  GroupPartInfo
 Information to share a group into elements of the same subtype. More...
class  WriteBase
 Functor for writing a variable. More...
class  WriteDouble
 Functor for writing a variable of type Real. More...
class  WriteArrayDouble
 Functor for writing a variable of type Real. More...
class  WriteReal3
 Functor to write a variable of type Real2. More...
class  WriteArrayReal3
 Functor to write a variable of type Real3. More...

Public Member Functions

void writeFileString (std::ostream &o, const String &str)
void writeFileInt (std::ostream &o, int value)
void writeFileDouble (std::ostream &o, double value)
Integer writeDoubleSize () const
Integer writeIntSize () const
void writeFileArray (std::ostream &o, IntegerConstArrayView value)
bool isBinary () const
 DumpWEnsight7 (IMesh *m, const String &filename, RealConstArrayView times, VariableCollection variables, ItemGroupCollection groups, bool is_binary, bool is_parallel, Integer fileset_size, bool use_degenerated_hexa, bool force_first_geometry, bool save_uids)
void writeVal (IVariable &, ConstArrayView< Byte >) override
 Writing for variable v of array a.
void writeVal (IVariable &v, ConstArrayView< Real > a) override
void writeVal (IVariable &, ConstArrayView< Real2 >) override
void writeVal (IVariable &, ConstArrayView< Real3 >) override
 Saving vector variables.
void writeVal (IVariable &v, ConstArrayView< Int16 > a) override
void writeVal (IVariable &v, ConstArrayView< Int32 > a) override
void writeVal (IVariable &v, ConstArrayView< Int64 > a) override
void writeVal (IVariable &, ConstArrayView< Real2x2 >) override
void writeVal (IVariable &, ConstArrayView< Real3x3 >) override
void writeVal (IVariable &, ConstArrayView< String >) override
void writeVal (IVariable &, ConstArray2View< Byte >) override
void writeVal (IVariable &v, ConstArray2View< Real > a) override
void writeVal (IVariable &, ConstArray2View< Real2 >) override
void writeVal (IVariable &, ConstArray2View< Real3 >) override
 Saving vector array variables.
void writeVal (IVariable &v, ConstArray2View< Int16 > a) override
void writeVal (IVariable &v, ConstArray2View< Int32 > a) override
void writeVal (IVariable &v, ConstArray2View< Int64 > a) override
void writeVal (IVariable &, ConstArray2View< Real2x2 >) override
void writeVal (IVariable &, ConstArray2View< Real3x3 >) override
void writeVal (IVariable &, ConstMultiArray2View< Byte >) override
void writeVal (IVariable &v, ConstMultiArray2View< Real > a) override
void writeVal (IVariable &, ConstMultiArray2View< Real2 >) override
void writeVal (IVariable &, ConstMultiArray2View< Real3 > a) override
 Saving vector array variables.
void writeVal (IVariable &v, ConstMultiArray2View< Int16 > a) override
void writeVal (IVariable &v, ConstMultiArray2View< Int32 > a) override
void writeVal (IVariable &v, ConstMultiArray2View< Int64 > a) override
void writeVal (IVariable &, ConstMultiArray2View< Real2x2 >) override
void writeVal (IVariable &, ConstMultiArray2View< Real3x3 >) override
void beginWrite () override
 Notifies the start of writing.
void endWrite () override
 Notifies the end of writing.
void setMetaData (const String &) override
 Sets metadata information.
bool isParallelOutput () const
bool isMasterProcessor () const
bool isOneFilePerTime () const
Int32 rank () const
IParallelMngparallelMng () const
Public Member Functions inherited from Arcane::DumpW
 DumpW ()
 Constructor.
virtual ~DumpW ()
 Frees resources.
void beginWrite (const VariableCollection &vars)
 Notifies the start of writing.
void write (IVariable *var, IData *data)
 Writes the data data of the variable var.
Public Member Functions inherited from Arcane::IDataWriter
virtual ~IDataWriter ()=default
 Frees resources.
Public Member Functions inherited from Arcane::TraceAccessor
 TraceAccessor (ITraceMng *m)
 Constructs an accessor via the trace manager m.
 TraceAccessor (const TraceAccessor &rhs)
 Copy constructor.
TraceAccessoroperator= (const TraceAccessor &rhs)
 Copy assignment operator.
virtual ~TraceAccessor ()
 Frees resources.
ITraceMngtraceMng () const
 Trace manager.
TraceMessage info () const
 Flow for an information message.
TraceMessage pinfo () const
 Flow for a parallel information message.
TraceMessage info (char category) const
 Flow for an information message of a given category.
TraceMessage pinfo (char category) const
 Flow for a parallel information message of a given category.
TraceMessage info (bool v) const
 Flow for an information message.
TraceMessage warning () const
 Flow for a warning message.
TraceMessage pwarning () const
TraceMessage error () const
 Flow for an error message.
TraceMessage perror () const
TraceMessage log () const
 Flow for a log message.
TraceMessage plog () const
 Flow for a log message.
TraceMessage logdate () const
 Flow for a log message preceded by the date.
TraceMessage fatal () const
 Flow for a fatal error message.
TraceMessage pfatal () const
 Flow for a parallel fatal error message.
TraceMessageDbg debug (Trace::eDebugLevel=Trace::Medium) const
 Flow for a debug message.
Trace::eDebugLevel configDbgLevel () const
 Debug level of the configuration file.
TraceMessage info (Int32 verbose_level) const
 Flow for an information message of a given level.
TraceMessage linfo () const
 Flow for an information message with the local information level of this instance.
TraceMessage linfo (Int32 relative_level) const
 Flow for an information message with the local information level of this instance.
void fatalMessage (const StandaloneTraceMessage &o) const

Static Public Attributes

static const int int_width = 10
static const int g_line_length = 80

Private Types

typedef UniqueArray< GroupPartInfo * > GroupPartInfoList

Private Member Functions

bool _isValidVariable (IVariable &) const
 Checks the validity of the variable to be saved.
void _createCaseFile ()
void _buildFileName (const String &varname, String &filename)
 Constructs the filename for a variable or mesh name.
void _buildPartDirectory ()
 Constructs the directory where the variables will be saved.
void _writeWildcardFilename (std::ostream &ofile, const String &filename, char joker=' *')
int _fileOuttype () const
void _writeFileHeader (std::ostream &o, bool write_c_binary)
bool _isNewBlocFile () const
void _computeGroupParts (ItemGroupList list_group, Integer &partid)
void _saveGroup (std::ostream &ofile, const GroupPartInfo &ensight_grp, ConstArrayView< Integer > nodes_index, WriteBase &wf)
void _saveVariableOnGroup (std::ostream &ofile, const GroupPartInfo &ensight_grp, WriteBase &from_func)
bool _isSameKindOfGroup (const ItemGroup &group, eItemKind item_kind)
template<typename T>
void _writeRealValT (IVariable &v, ConstArrayView< T > a)
 Template for writing variable as a real variable.
template<typename T>
void _writeRealValT (IVariable &v, ConstArray2View< T > a)
 Template for writing array variable as an array real variable.
template<typename T>
void _writeRealValT (IVariable &v, ConstMultiArray2View< T > a)
 Template for writing array variable as an array real variable.

Private Attributes

IMeshm_mesh
 Mesh.
IParallelMngm_parallel_mng
 Parallelism manager.
Directory m_base_directory
 Storage directory name.
Directory m_part_directory
 Storage directory for the current iteration.
std::ofstream m_case_file
 File describing the case.
std::ostringstream m_case_file_variables
RealUniqueArray m_times
 description of saved variables
VariableList m_save_variables
 List of variables to export.
ItemGroupList m_save_groups
 List of groups to export.
GroupPartInfoList m_parts
bool m_is_binary
 List of parts.
bool m_is_master
 true if the processor manages the output
bool m_is_parallel_output
bool m_use_degenerated_hexa
bool m_force_first_geometry
bool m_save_uids
Integer m_total_nb_element
 Total number of mesh elements across all groups to be saved.
Integer m_total_nb_group
 Number of groups to save (== number of parts).
Integer m_fileset_size

Static Private Attributes

static const Integer m_max_prots_digit = 6
 Maximum number of digits to indicate the protection number.

(Note that these are not member symbols.)

void _computeGroupParts (ItemGroupList list_group, Integer &partid)
 Retrieves a group of a given type and its information.
void _saveGroup (std::ostream &ofile, const GroupPartInfo &ensight_grp, ConstArrayView< Integer > nodes_index, WriteBase &wf)
 Saves the connectivity of elements in a group.
void _saveVariableOnGroup (std::ostream &ofile, const GroupPartInfo &ensight_grp, WriteBase &from_func)
 Applies a functor to the elements of a group.

Additional Inherited Members

Protected Member Functions inherited from Arcane::TraceAccessor
void _setLocalVerboseLevel (Int32 v)
Int32 _localVerboseLevel () const

Detailed Description

Writes in Ensight7 format.

The writing is done in Ensight case format and in ASCII.

There are two saving mechanisms depending on whether the temporal aspect is used or not. The choice is made using the array m_times. If it is empty, a snapshot is taken, meaning just an output of the variables. If it is not empty, a temporal output is performed, which contains a list of time instants, and in this case, a time save is performed. The variables are then saved at their current value, considering it to be the last protection of the array m_times. To have larger files, #m_fileset_size protections are saved per file.

In both cases, m_base_directory contains the path and directory where the variables will be saved.

The case format uses one file to describe the case (.case), one file to describe the geometry (.geo), and one file per variable. In the case of a temporal save, there is one geometry and one variable file per time instant. In this case, the file names are suffixed by the protection number. For example, for a variable 'Pressure', the save file name in the case of a snapshot is just 'Pressure'. In the case of a temporal save at the 4th protection, the name will be 'Pressure000004'.

For more precision in the Ensight case format, refer to the user manual for Ensight6 or Ensight7.

Definition at line 95 of file DumpWEnsight7.cc.

Member Typedef Documentation

◆ GroupPartInfoList

typedef UniqueArray<GroupPartInfo*> Arcane::DumpWEnsight7::GroupPartInfoList
private

Definition at line 727 of file DumpWEnsight7.cc.

Constructor & Destructor Documentation

◆ DumpWEnsight7()

Arcane::DumpWEnsight7::DumpWEnsight7 ( IMesh * m,
const String & filename,
RealConstArrayView times,
VariableCollection variables,
ItemGroupCollection groups,
bool is_binary,
bool is_parallel,
Integer fileset_size,
bool use_degenerated_hexa,
bool force_first_geometry,
bool save_uids )

Definition at line 825 of file DumpWEnsight7.cc.

◆ ~DumpWEnsight7()

Arcane::DumpWEnsight7::~DumpWEnsight7 ( )

Definition at line 862 of file DumpWEnsight7.cc.

Member Function Documentation

◆ _buildFileName()

void Arcane::DumpWEnsight7::_buildFileName ( const String & name,
String & filename )
private

Constructs the filename for a variable or mesh name.

Constructs the filename in which a variable or mesh named name will be saved. The filename is returned in filename.

The protection number is inserted at the end of the file in the form of a number formatted with m_max_prots_digit characters. For example, for 'Pressure' at iteration 4 with #m_max_prot_digit equal to 6, we will get the filename 'Pressure000004'.

Todo
change the filename determination and use Directory.

Definition at line 1770 of file DumpWEnsight7.cc.

References Arcane::Directory::createDirectory(), m_base_directory, m_is_master, m_max_prots_digit, m_part_directory, m_times, and Arcane::StringBuilder::toString().

Referenced by _writeRealValT(), _writeRealValT(), beginWrite(), writeVal(), and writeVal().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _buildPartDirectory()

void Arcane::DumpWEnsight7::_buildPartDirectory ( )
private

Constructs the directory where the variables will be saved.

If you want the outputs in multiple files, the directory of the current block is named 'bloc******'. For example, for the 4th block, it is 'bloc000004'.

the block number is inserted in the form of a number formatted with m_max_prots_digit characters.

Definition at line 1830 of file DumpWEnsight7.cc.

References m_base_directory, m_is_master, m_max_prots_digit, m_part_directory, and m_times.

Referenced by beginWrite().

Here is the caller graph for this function:

◆ _fileOuttype()

int Arcane::DumpWEnsight7::_fileOuttype ( ) const
private

Definition at line 1910 of file DumpWEnsight7.cc.

◆ _isNewBlocFile()

bool Arcane::DumpWEnsight7::_isNewBlocFile ( ) const
private

Definition at line 1890 of file DumpWEnsight7.cc.

◆ _isSameKindOfGroup()

bool Arcane::DumpWEnsight7::_isSameKindOfGroup ( const ItemGroup & group,
eItemKind item_kind )
private

Definition at line 1809 of file DumpWEnsight7.cc.

◆ _isValidVariable()

bool Arcane::DumpWEnsight7::_isValidVariable ( IVariable & v) const
private

Checks the validity of the variable to be saved.

Only variables at nodes, faces, or cells are processed.

Only variables in the #m_save_variable_list are saved. If this list is empty, all are saved.

Return values
trueif the variable is valid
falseotherwise

Definition at line 1739 of file DumpWEnsight7.cc.

References Arcane::IK_Cell, Arcane::IK_Face, Arcane::IK_Node, Arcane::IVariable::isUsed(), Arcane::IVariable::itemKind(), and m_save_variables.

Referenced by _writeRealValT(), _writeRealValT(), _writeRealValT(), writeVal(), writeVal(), and writeVal().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _writeFileHeader()

void Arcane::DumpWEnsight7::_writeFileHeader ( std::ostream & o,
bool write_c_binary )
private

Definition at line 1335 of file DumpWEnsight7.cc.

◆ _writeRealValT() [1/3]

template<typename T>
void Arcane::DumpWEnsight7::_writeRealValT ( IVariable & v,
ConstArray2View< T > a )
private

Template for writing array variable as an array real variable.

Saving constant dimension array variables (by row) of scalars.

Definition at line 2019 of file DumpWEnsight7.cc.

References _buildFileName(), _isValidVariable(), Arcane::TraceAccessor::debug(), Arcane::IK_Cell, Arcane::IK_Edge, Arcane::IK_Face, Arcane::IK_Node, Arcane::IVariable::isPartial(), Arcane::IVariable::itemGroup(), Arcane::IVariable::itemKind(), Arcane::ItemGroup::localIdToIndex(), m_is_master, and Arcane::IVariable::name().

Here is the call graph for this function:

◆ _writeRealValT() [2/3]

template<typename T>
void Arcane::DumpWEnsight7::_writeRealValT ( IVariable & v,
ConstArrayView< T > a )
private

Template for writing variable as a real variable.

Saves scalar variables.

Definition at line 1923 of file DumpWEnsight7.cc.

References _buildFileName(), _isValidVariable(), Arcane::ConstArrayView< T >::data(), Arcane::TraceAccessor::debug(), Arcane::IK_Cell, Arcane::IK_Edge, Arcane::IK_Face, Arcane::IK_Node, Arcane::IVariable::isPartial(), Arcane::IVariable::itemGroup(), Arcane::IVariable::itemKind(), Arcane::ItemGroup::localIdToIndex(), m_is_master, Arcane::IVariable::name(), and Arcane::ConstArrayView< T >::size().

Referenced by endWrite().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _writeRealValT() [3/3]

template<typename T>
void Arcane::DumpWEnsight7::_writeRealValT ( IVariable & v,
ConstMultiArray2View< T > a )
private

Template for writing array variable as an array real variable.

Saving non-constant dimension array variables (by row) of scalars.

Definition at line 2116 of file DumpWEnsight7.cc.

References _isValidVariable(), Arcane::IVariable::name(), and Arcane::TraceAccessor::warning().

Here is the call graph for this function:

◆ _writeWildcardFilename()

void Arcane::DumpWEnsight7::_writeWildcardFilename ( std::ostream & ofile,
const String & filename,
char joker = '*' )
private

Definition at line 1864 of file DumpWEnsight7.cc.

◆ beginWrite()

◆ endWrite()

void Arcane::DumpWEnsight7::endWrite ( )
overridevirtual

◆ isBinary()

bool Arcane::DumpWEnsight7::isBinary ( ) const
inline

Definition at line 350 of file DumpWEnsight7.cc.

◆ isMasterProcessor()

bool Arcane::DumpWEnsight7::isMasterProcessor ( ) const
inline

Definition at line 719 of file DumpWEnsight7.cc.

◆ isOneFilePerTime()

bool Arcane::DumpWEnsight7::isOneFilePerTime ( ) const
inline

Definition at line 720 of file DumpWEnsight7.cc.

◆ isParallelOutput()

bool Arcane::DumpWEnsight7::isParallelOutput ( ) const
inline

Definition at line 718 of file DumpWEnsight7.cc.

◆ parallelMng()

IParallelMng * Arcane::DumpWEnsight7::parallelMng ( ) const
inline

Definition at line 722 of file DumpWEnsight7.cc.

◆ rank()

Int32 Arcane::DumpWEnsight7::rank ( ) const
inline

Definition at line 721 of file DumpWEnsight7.cc.

◆ setMetaData()

void Arcane::DumpWEnsight7::setMetaData ( const String & meta_data)
inlineoverridevirtual

Sets metadata information.

Implements Arcane::DumpW.

Definition at line 716 of file DumpWEnsight7.cc.

◆ writeDoubleSize()

Integer Arcane::DumpWEnsight7::writeDoubleSize ( ) const

Definition at line 1288 of file DumpWEnsight7.cc.

◆ writeFileArray()

void Arcane::DumpWEnsight7::writeFileArray ( std::ostream & o,
IntegerConstArrayView value )

Definition at line 1298 of file DumpWEnsight7.cc.

◆ writeFileDouble()

void Arcane::DumpWEnsight7::writeFileDouble ( std::ostream & o,
double value )

Definition at line 1269 of file DumpWEnsight7.cc.

◆ writeFileInt()

void Arcane::DumpWEnsight7::writeFileInt ( std::ostream & o,
int value )

Definition at line 1242 of file DumpWEnsight7.cc.

◆ writeFileString()

void Arcane::DumpWEnsight7::writeFileString ( std::ostream & o,
const String & str )

Definition at line 1316 of file DumpWEnsight7.cc.

◆ writeIntSize()

Integer Arcane::DumpWEnsight7::writeIntSize ( ) const

Definition at line 1258 of file DumpWEnsight7.cc.

◆ writeVal() [1/28]

void Arcane::DumpWEnsight7::writeVal ( IVariable & ,
ConstArray2View< Byte >  )
inlineoverridevirtual

Implements Arcane::DumpW.

Definition at line 694 of file DumpWEnsight7.cc.

◆ writeVal() [2/28]

void Arcane::DumpWEnsight7::writeVal ( IVariable & ,
ConstArray2View< Real2 >  )
inlineoverridevirtual

Implements Arcane::DumpW.

Definition at line 696 of file DumpWEnsight7.cc.

◆ writeVal() [3/28]

void Arcane::DumpWEnsight7::writeVal ( IVariable & ,
ConstArray2View< Real2x2 >  )
inlineoverridevirtual

Implements Arcane::DumpW.

Definition at line 701 of file DumpWEnsight7.cc.

◆ writeVal() [4/28]

void Arcane::DumpWEnsight7::writeVal ( IVariable & v,
ConstArray2View< Real3 > ptr )
overridevirtual

Saving vector array variables.

Implements Arcane::DumpW.

Definition at line 2222 of file DumpWEnsight7.cc.

References _buildFileName(), _isValidVariable(), Arcane::TraceAccessor::debug(), Arcane::IK_Cell, Arcane::IK_Edge, Arcane::IK_Face, Arcane::IK_Node, Arcane::IVariable::isPartial(), Arcane::IVariable::itemGroup(), Arcane::IVariable::itemKind(), Arcane::ItemGroup::localIdToIndex(), m_is_master, and Arcane::IVariable::name().

Here is the call graph for this function:

◆ writeVal() [5/28]

void Arcane::DumpWEnsight7::writeVal ( IVariable & ,
ConstArray2View< Real3x3 >  )
inlineoverridevirtual

Implements Arcane::DumpW.

Definition at line 702 of file DumpWEnsight7.cc.

◆ writeVal() [6/28]

void Arcane::DumpWEnsight7::writeVal ( IVariable & v,
ConstArrayView< Byte > a )
inlineoverridevirtual

Writing for variable v of array a.

Implements Arcane::DumpW.

Definition at line 683 of file DumpWEnsight7.cc.

◆ writeVal() [7/28]

void Arcane::DumpWEnsight7::writeVal ( IVariable & ,
ConstArrayView< Real2 >  )
inlineoverridevirtual

Implements Arcane::DumpW.

Definition at line 685 of file DumpWEnsight7.cc.

◆ writeVal() [8/28]

void Arcane::DumpWEnsight7::writeVal ( IVariable & ,
ConstArrayView< Real2x2 >  )
inlineoverridevirtual

Implements Arcane::DumpW.

Definition at line 690 of file DumpWEnsight7.cc.

◆ writeVal() [9/28]

void Arcane::DumpWEnsight7::writeVal ( IVariable & v,
ConstArrayView< Real3 > ptr )
overridevirtual

Saving vector variables.

Implements Arcane::DumpW.

Definition at line 2134 of file DumpWEnsight7.cc.

References _buildFileName(), _isValidVariable(), Arcane::TraceAccessor::debug(), Arcane::IK_Cell, Arcane::IK_Edge, Arcane::IK_Face, Arcane::IK_Node, Arcane::IVariable::isPartial(), Arcane::IVariable::itemGroup(), Arcane::IVariable::itemKind(), Arcane::ItemGroup::localIdToIndex(), m_is_master, Arcane::IVariable::name(), and Arcane::ConstArrayView< T >::size().

Here is the call graph for this function:

◆ writeVal() [10/28]

void Arcane::DumpWEnsight7::writeVal ( IVariable & ,
ConstArrayView< Real3x3 >  )
inlineoverridevirtual

Implements Arcane::DumpW.

Definition at line 691 of file DumpWEnsight7.cc.

◆ writeVal() [11/28]

void Arcane::DumpWEnsight7::writeVal ( IVariable & ,
ConstArrayView< String >  )
inlineoverridevirtual

Implements Arcane::DumpW.

Definition at line 692 of file DumpWEnsight7.cc.

◆ writeVal() [12/28]

void Arcane::DumpWEnsight7::writeVal ( IVariable & ,
ConstMultiArray2View< Byte >  )
inlineoverridevirtual

Implements Arcane::DumpW.

Definition at line 704 of file DumpWEnsight7.cc.

◆ writeVal() [13/28]

void Arcane::DumpWEnsight7::writeVal ( IVariable & ,
ConstMultiArray2View< Real2 >  )
inlineoverridevirtual

Implements Arcane::DumpW.

Definition at line 706 of file DumpWEnsight7.cc.

◆ writeVal() [14/28]

void Arcane::DumpWEnsight7::writeVal ( IVariable & ,
ConstMultiArray2View< Real2x2 >  )
inlineoverridevirtual

Implements Arcane::DumpW.

Definition at line 711 of file DumpWEnsight7.cc.

◆ writeVal() [15/28]

void Arcane::DumpWEnsight7::writeVal ( IVariable & v,
ConstMultiArray2View< Real3 > a )
overridevirtual

Saving vector array variables.

Implements Arcane::DumpW.

Definition at line 2316 of file DumpWEnsight7.cc.

References _isValidVariable(), Arcane::IVariable::name(), and Arcane::TraceAccessor::warning().

Here is the call graph for this function:

◆ writeVal() [16/28]

void Arcane::DumpWEnsight7::writeVal ( IVariable & ,
ConstMultiArray2View< Real3x3 >  )
inlineoverridevirtual

Implements Arcane::DumpW.

Definition at line 712 of file DumpWEnsight7.cc.

◆ writeVal() [17/28]

void Arcane::DumpWEnsight7::writeVal ( IVariable & v,
ConstArray2View< Int16 > a )
inlineoverridevirtual

Reimplemented from Arcane::DumpW.

Definition at line 698 of file DumpWEnsight7.cc.

◆ writeVal() [18/28]

void Arcane::DumpWEnsight7::writeVal ( IVariable & v,
ConstArray2View< Int32 > a )
inlineoverridevirtual

Implements Arcane::DumpW.

Definition at line 699 of file DumpWEnsight7.cc.

◆ writeVal() [19/28]

void Arcane::DumpWEnsight7::writeVal ( IVariable & v,
ConstArray2View< Int64 > a )
inlineoverridevirtual

Implements Arcane::DumpW.

Definition at line 700 of file DumpWEnsight7.cc.

◆ writeVal() [20/28]

void Arcane::DumpWEnsight7::writeVal ( IVariable & v,
ConstArray2View< Real > a )
inlineoverridevirtual

Implements Arcane::DumpW.

Definition at line 695 of file DumpWEnsight7.cc.

◆ writeVal() [21/28]

void Arcane::DumpWEnsight7::writeVal ( IVariable & v,
ConstArrayView< Int16 > a )
inlineoverridevirtual

Reimplemented from Arcane::DumpW.

Definition at line 687 of file DumpWEnsight7.cc.

◆ writeVal() [22/28]

void Arcane::DumpWEnsight7::writeVal ( IVariable & v,
ConstArrayView< Int32 > a )
inlineoverridevirtual

Implements Arcane::DumpW.

Definition at line 688 of file DumpWEnsight7.cc.

◆ writeVal() [23/28]

void Arcane::DumpWEnsight7::writeVal ( IVariable & v,
ConstArrayView< Int64 > a )
inlineoverridevirtual

Implements Arcane::DumpW.

Definition at line 689 of file DumpWEnsight7.cc.

◆ writeVal() [24/28]

void Arcane::DumpWEnsight7::writeVal ( IVariable & v,
ConstArrayView< Real > a )
inlineoverridevirtual

Implements Arcane::DumpW.

Definition at line 684 of file DumpWEnsight7.cc.

◆ writeVal() [25/28]

void Arcane::DumpWEnsight7::writeVal ( IVariable & v,
ConstMultiArray2View< Int16 > a )
inlineoverridevirtual

Reimplemented from Arcane::DumpW.

Definition at line 708 of file DumpWEnsight7.cc.

◆ writeVal() [26/28]

void Arcane::DumpWEnsight7::writeVal ( IVariable & v,
ConstMultiArray2View< Int32 > a )
inlineoverridevirtual

Implements Arcane::DumpW.

Definition at line 709 of file DumpWEnsight7.cc.

◆ writeVal() [27/28]

void Arcane::DumpWEnsight7::writeVal ( IVariable & v,
ConstMultiArray2View< Int64 > a )
inlineoverridevirtual

Implements Arcane::DumpW.

Definition at line 710 of file DumpWEnsight7.cc.

◆ writeVal() [28/28]

void Arcane::DumpWEnsight7::writeVal ( IVariable & v,
ConstMultiArray2View< Real > a )
inlineoverridevirtual

Implements Arcane::DumpW.

Definition at line 705 of file DumpWEnsight7.cc.

◆ _computeGroupParts()

void _computeGroupParts ( ItemGroupList list_group,
Integer & partid )
related

Retrieves a group of a given type and its information.

The template parameter is either a DumpWEnsight7::CellGroup, or a DumpWEnsight7::FaceGroup.

First, iterate through the list of groups (list_group) and retrieve those of type T::GroupType. Add these groups to the list grp_list and assign them a number partid. Note that partid is passed by reference and is incremented in this function. This identifier corresponds to the part number (part) in ensight.

Next, determine for each of its groups the number of elements of each Ensight subtype. For example, for a cell group, determine the number of hexa8, the number of pyramid5, ...

Definition at line 892 of file DumpWEnsight7.cc.

References Arcane::TraceAccessor::debug(), ENUMERATE_ITEM, Arcane::ItemTypeMng::hasGeneralCells(), Arcane::Trace::High, Arcane::IK_Cell, Arcane::IK_Face, Arcane::ItemGroup::isOwn(), Arcane::ItemGroup::itemKind(), Arcane::IMesh::itemTypeMng(), Arcane::ItemGroup::mesh(), Arcane::ItemGroup::name(), Arcane::ItemTypeMng::nbBasicItemType(), Arcane::ItemTypeMng::nbBuiltInItemType(), Arcane::DumpWEnsight7::GroupPartInfo::nbType(), Arcane::ItemGroup::null(), Arcane::ItemGroup::own(), Arcane::Array< T >::resize(), Arcane::Item::toItemWithNodes(), and Arcane::Item::type().

Here is the call graph for this function:

◆ _saveGroup()

void _saveGroup ( std::ostream & ofile,
const GroupPartInfo & ensight_grp,
ConstArrayView< Integer > nodes_index,
WriteBase & wf )
related

Saves the connectivity of elements in a group.

Saves the connectivity of the elements in group ensight_grp. The difficulty comes from the fact that Ensight requires that elements be saved according to their type, that is, hexa on one side, tetra on the other, and so on. ensight_grp.m_nb_sub_part[] contains the number of elements for each ensight type. Therefore, we iterate through the list of elements of the group autant de fois qu'il y a de possible Ensight types (4 for cells, 2 for faces), and in each pass, we only save elements that are of the correct type. It is a bit tedious, but it avoids having to manage a list for each subtype.

Parameters
ofileoutput stream
nodes_indexindex of each node in the Ensight coordinate array.
ensight_grpgroup to save
wfwriter

Definition at line 996 of file DumpWEnsight7.cc.

References Arcane::ConstArrayView< T >::data(), Arcane::Cell::face(), Arcane::Cell::faces(), Arcane::ItemTypeInfo::localFace(), Arcane::Item::localId(), Arcane::String::localstr(), m_mesh, Arcane::ItemGroup::name(), Arcane::Cell::nbFace(), Arcane::ItemTypeInfo::nbLocalFace(), Arcane::ItemTypeInfo::LocalFace::nbNode(), Arcane::ItemWithNodes::nbNode(), Arcane::DumpWEnsight7::GroupPartInfo::nbType(), Arcane::ItemTypeInfo::LocalFace::node(), Arcane::ItemWithNodes::node(), Arcane::Array< T >::resize(), Arcane::ConstArrayView< T >::size(), Arcane::Item::toCell(), Arcane::Item::toItemWithNodes(), Arcane::Item::typeInfo(), and Arcane::Item::uniqueId().

Here is the call graph for this function:

◆ _saveVariableOnGroup()

void _saveVariableOnGroup ( std::ostream & ofile,
const GroupPartInfo & ensight_grp,
WriteBase & from_func )
related

Applies a functor to the elements of a group.

Applies the functor from_func to the group ensight_grp.

The functor must derive from WriteBase and is used to save a variable of a given type. In Ensight, variables are saved for each part and each element type (hexa8, ...). The operation is similar to saving the geometry (see the function _ensightSaveGroup()). Therefore, the same procedure must be followed: iterate over the group as many times as there are element types, and in one iteration, only save the variables for a given element type.

Warning
This function will not support the processing of variables defined on a group other than the set of elements.
See also
WriteFunctor
Parameters
ofileoutput stream
ensight_grpgroup
from_funcfunctor

Definition at line 1195 of file DumpWEnsight7.cc.

References Arcane::PtrT< T >::get(), Arcane::DumpWEnsight7::GroupPartInfo::nbType(), and Arcane::ConstArrayView< T >::size().

Here is the call graph for this function:

Member Data Documentation

◆ g_line_length

const int Arcane::DumpWEnsight7::g_line_length = 80
static

Definition at line 102 of file DumpWEnsight7.cc.

◆ int_width

const int Arcane::DumpWEnsight7::int_width = 10
static

Definition at line 101 of file DumpWEnsight7.cc.

◆ m_base_directory

Directory Arcane::DumpWEnsight7::m_base_directory
private

Storage directory name.

Definition at line 733 of file DumpWEnsight7.cc.

Referenced by _buildFileName(), _buildPartDirectory(), beginWrite(), and endWrite().

◆ m_case_file

std::ofstream Arcane::DumpWEnsight7::m_case_file
private

File describing the case.

Definition at line 735 of file DumpWEnsight7.cc.

Referenced by endWrite().

◆ m_case_file_variables

std::ostringstream Arcane::DumpWEnsight7::m_case_file_variables
private

Definition at line 736 of file DumpWEnsight7.cc.

◆ m_fileset_size

Integer Arcane::DumpWEnsight7::m_fileset_size
private

Definition at line 755 of file DumpWEnsight7.cc.

◆ m_force_first_geometry

bool Arcane::DumpWEnsight7::m_force_first_geometry
private

Definition at line 747 of file DumpWEnsight7.cc.

◆ m_is_binary

bool Arcane::DumpWEnsight7::m_is_binary
private

List of parts.

true if file is in binary format

Definition at line 741 of file DumpWEnsight7.cc.

◆ m_is_master

bool Arcane::DumpWEnsight7::m_is_master
private

true if the processor manages the output

Definition at line 742 of file DumpWEnsight7.cc.

Referenced by _buildFileName(), _buildPartDirectory(), _writeRealValT(), _writeRealValT(), beginWrite(), endWrite(), writeVal(), and writeVal().

◆ m_is_parallel_output

bool Arcane::DumpWEnsight7::m_is_parallel_output
private

true if outputs are parallel with a proc collecting the outputs from others

Definition at line 745 of file DumpWEnsight7.cc.

Referenced by beginWrite().

◆ m_max_prots_digit

const Integer Arcane::DumpWEnsight7::m_max_prots_digit = 6
staticprivate

Maximum number of digits to indicate the protection number.

Definition at line 761 of file DumpWEnsight7.cc.

Referenced by _buildFileName(), and _buildPartDirectory().

◆ m_mesh

IMesh* Arcane::DumpWEnsight7::m_mesh
private

Mesh.

Definition at line 731 of file DumpWEnsight7.cc.

Referenced by _saveGroup(), beginWrite(), and endWrite().

◆ m_parallel_mng

IParallelMng* Arcane::DumpWEnsight7::m_parallel_mng
private

Parallelism manager.

Definition at line 732 of file DumpWEnsight7.cc.

Referenced by beginWrite().

◆ m_part_directory

Directory Arcane::DumpWEnsight7::m_part_directory
private

Storage directory for the current iteration.

Definition at line 734 of file DumpWEnsight7.cc.

Referenced by _buildFileName(), and _buildPartDirectory().

◆ m_parts

GroupPartInfoList Arcane::DumpWEnsight7::m_parts
private

Definition at line 740 of file DumpWEnsight7.cc.

◆ m_save_groups

ItemGroupList Arcane::DumpWEnsight7::m_save_groups
private

List of groups to export.

Definition at line 739 of file DumpWEnsight7.cc.

Referenced by beginWrite().

◆ m_save_uids

bool Arcane::DumpWEnsight7::m_save_uids
private

Definition at line 748 of file DumpWEnsight7.cc.

◆ m_save_variables

VariableList Arcane::DumpWEnsight7::m_save_variables
private

List of variables to export.

Definition at line 738 of file DumpWEnsight7.cc.

Referenced by _isValidVariable(), beginWrite(), and endWrite().

◆ m_times

RealUniqueArray Arcane::DumpWEnsight7::m_times
private

description of saved variables

List of time instants

Definition at line 737 of file DumpWEnsight7.cc.

Referenced by _buildFileName(), _buildPartDirectory(), beginWrite(), and endWrite().

◆ m_total_nb_element

Integer Arcane::DumpWEnsight7::m_total_nb_element
private

Total number of mesh elements across all groups to be saved.

Definition at line 750 of file DumpWEnsight7.cc.

Referenced by beginWrite().

◆ m_total_nb_group

Integer Arcane::DumpWEnsight7::m_total_nb_group
private

Number of groups to save (== number of parts).

Number of elements in a timeset When saving multiple time instants in one file, a maximum of m_fileset_size time instants are placed in one file, and when this number is reached, another file is used.

Definition at line 751 of file DumpWEnsight7.cc.

Referenced by beginWrite().

◆ m_use_degenerated_hexa

bool Arcane::DumpWEnsight7::m_use_degenerated_hexa
private

Definition at line 746 of file DumpWEnsight7.cc.


The documentation for this class was generated from the following file: