OOFEM
2.4
OOFEM.org - Object Oriented Finite Element Solver
|
The purpose of DataStream abstract class is to allow to store/restore context to different streams, including file, communication buffers, etc., using the same routine. More...
#include <datastream.h>
Public Member Functions | |
virtual | ~DataStream () |
Destructor. More... | |
Data Stream reading methods. | |
These methods read "count" values from data stream into array passed as the first argument. All functions return nonzero if successful. | |
virtual int | read (int *data, int count)=0 |
Reads count integer values into array pointed by data. More... | |
int | read (int &data) |
virtual int | read (unsigned long *data, int count)=0 |
Reads count unsigned long values into array pointed by data. More... | |
int | read (unsigned long &data) |
virtual int | read (long *data, int count)=0 |
Reads count long values into array pointed by data. More... | |
int | read (long &data) |
virtual int | read (double *data, int count)=0 |
Reads count double values into array pointed by data. More... | |
int | read (double &data) |
virtual int | read (char *data, int count)=0 |
Reads count char values into array pointed by data. More... | |
int | read (char &data) |
virtual int | read (bool &data)=0 |
Reads a bool value from data. More... | |
int | read (std::string &data) |
Reads a string (stored as an int for the length followed by char*). More... | |
Data Stream writing methods. | |
These methods write "count" values of data into stream. All functions return nonzero if successful. | |
virtual int | write (const int *data, int count)=0 |
Writes count integer values from array pointed by data. More... | |
int | write (int data) |
virtual int | write (const unsigned long *data, int count)=0 |
Writes count unsigned long values from array pointed by data. More... | |
int | write (unsigned long data) |
virtual int | write (const long *data, int count)=0 |
Writes count long values from array pointed by data. More... | |
int | write (long data) |
virtual int | write (const double *data, int count)=0 |
Writes count double values from array pointed by data. More... | |
int | write (double data) |
virtual int | write (const char *data, int count)=0 |
Writes count char values from array pointed by data. More... | |
int | write (char data) |
virtual int | write (bool data)=0 |
Writes a bool value. More... | |
int | write (const std::string &data) |
Reads a string (stored as an int for the length followed by char*). More... | |
int | write (const char *data) |
Writes a string (wrapper needed, otherwise write(bool) is called ) More... | |
Sizing functions. | |
These methods compute the stored size (in bytes) of an array containing "count" elements. | |
virtual int | givePackSizeOfInt (int count)=0 |
virtual int | givePackSizeOfDouble (int count)=0 |
virtual int | givePackSizeOfChar (int count)=0 |
virtual int | givePackSizeOfBool (int count)=0 |
virtual int | givePackSizeOfLong (int count)=0 |
The purpose of DataStream abstract class is to allow to store/restore context to different streams, including file, communication buffers, etc., using the same routine.
This will facilitate many algorithms relying on saving/moving state of components (such as load balancing), without writing new (and very similar) routines. This will lead to a better consistency of code.
Definition at line 54 of file datastream.h.
|
inlinevirtual |
Destructor.
Definition at line 58 of file datastream.h.
|
pure virtual |
Implemented in oofem::CommunicationBuffer, oofem::FileDataStream, and oofem::ProcessCommunicatorBuff.
|
pure virtual |
Implemented in oofem::CommunicationBuffer, oofem::FileDataStream, and oofem::ProcessCommunicatorBuff.
|
pure virtual |
Implemented in oofem::CommunicationBuffer, oofem::FileDataStream, and oofem::ProcessCommunicatorBuff.
Referenced by oofem::LinearStatic::estimateMaxPackSize(), oofem::FETISolver::estimateMaxPackSize(), oofem::FreeWarping::estimateMaxPackSize(), oofem::StaticStructural::estimateMaxPackSize(), oofem::NonLinearDynamic::estimateMaxPackSize(), oofem::NonLinearStatic::estimateMaxPackSize(), oofem::NlDEIDynamic::estimateMaxPackSize(), oofem::MazarsNLMaterial::estimatePackSize(), oofem::TrabBoneNL3D::estimatePackSize(), oofem::MisesMatNl::estimatePackSize(), oofem::RankineMatNl::estimatePackSize(), oofem::IDNLMaterial::estimatePackSize(), oofem::FloatArray::givePackSize(), and oofem::FloatMatrix::givePackSize().
|
pure virtual |
Implemented in oofem::CommunicationBuffer, oofem::FileDataStream, and oofem::ProcessCommunicatorBuff.
Referenced by oofem::IntArray::givePackSize(), oofem::FloatArray::givePackSize(), and oofem::FloatMatrix::givePackSize().
|
pure virtual |
Implemented in oofem::CommunicationBuffer, oofem::FileDataStream, and oofem::ProcessCommunicatorBuff.
|
pure virtual |
Reads count integer values into array pointed by data.
Implemented in oofem::StaticCommunicationBuffer, oofem::DynamicCommunicationBuffer, oofem::FileDataStream, and oofem::ProcessCommunicatorBuff.
Referenced by read(), oofem::restore_components(), oofem::B3SolidMaterialStatus::restoreContext(), oofem::Eurocode2CreepMaterialStatus::restoreContext(), oofem::PatchIntegrationRule::restoreContext(), oofem::PlasticMaterialStatus::restoreContext(), oofem::PerfectlyPlasticMaterialStatus::restoreContext(), oofem::MazarsMaterialStatus::restoreContext(), oofem::BinghamFluidMaterial2Status::restoreContext(), oofem::CebFipSlip90MaterialStatus::restoreContext(), oofem::ProblemSequence::restoreContext(), oofem::BondCEBMaterialStatus::restoreContext(), oofem::IsoInterfaceDamageMaterialStatus::restoreContext(), oofem::MPlasticMaterialStatus::restoreContext(), oofem::IntMatIsoDamageStatus::restoreContext(), oofem::IsoInterfaceDamageMaterialStatus_2::restoreContext(), oofem::DruckerPragerPlasticitySMStatus::restoreContext(), oofem::FRCFCMStatus::restoreContext(), oofem::MPlasticMaterial2Status::restoreContext(), oofem::RCSDEMaterialStatus::restoreContext(), oofem::RCSDMaterialStatus::restoreContext(), oofem::Dictionary::restoreContext(), oofem::LinearConstraintBC::restoreContext(), oofem::IDGMaterialStatus::restoreContext(), oofem::SimpleSlaveDof::restoreContext(), oofem::Lattice2d::restoreContext(), oofem::MPSMaterialStatus::restoreContext(), oofem::HydrationModelStatus::restoreContext(), oofem::Concrete2MaterialStatus::restoreContext(), oofem::SlaveDof::restoreContext(), oofem::LEPlicElementInterface::restoreContext(), oofem::NlDEIDynamic::restoreContext(), oofem::MasterDof::restoreContext(), oofem::ConcreteDPMStatus::restoreContext(), oofem::MPSDamMaterialStatus::restoreContext(), oofem::IsotropicDamageMaterialStatus::restoreContext(), oofem::FEMComponent::restoreContext(), oofem::TrabBone3DStatus::restoreContext(), oofem::NonLinearStatic::restoreContext(), oofem::AnisotropicDamageMaterialStatus::restoreContext(), oofem::GeneralBoundaryCondition::restoreContext(), oofem::LevelSetPCS::restoreContext(), oofem::HuertaErrorEstimator::restoreContext(), oofem::ConcreteDPM2Status::restoreContext(), oofem::Node::restoreContext(), oofem::TimeStep::restoreContext(), oofem::SteelRelaxMatStatus::restoreContext(), oofem::XfemManager::restoreContext(), oofem::CylindricalALM::restoreContext(), oofem::MisesMatStatus::restoreContext(), oofem::PrimaryField::restoreContext(), oofem::IntegrationRule::restoreContext(), oofem::LatticeDamage2dStatus::restoreContext(), oofem::RankineMatStatus::restoreContext(), oofem::Dof::restoreContext(), oofem::DofManager::restoreContext(), oofem::Domain::restoreContext(), oofem::EngngModel::restoreContext(), oofem::Element::restoreContext(), oofem::StressStrainBaseVector::restoreYourself(), oofem::IntArray::restoreYourself(), oofem::FloatArray::restoreYourself(), oofem::FloatMatrix::restoreYourself(), oofem::MazarsNLMaterial::unpackAndUpdateUnknowns(), oofem::TrabBoneNL3D::unpackAndUpdateUnknowns(), oofem::MisesMatNl::unpackAndUpdateUnknowns(), oofem::RankineMatNl::unpackAndUpdateUnknowns(), oofem::IDNLMaterial::unpackAndUpdateUnknowns(), oofem::ExpCZMaterialStatus::updateYourself(), oofem::ProcessCommunicatorBuff::write(), and oofem::CommunicationBuffer::~CommunicationBuffer().
|
inline |
|
pure virtual |
Reads count unsigned long values into array pointed by data.
Implemented in oofem::StaticCommunicationBuffer, oofem::DynamicCommunicationBuffer, oofem::FileDataStream, and oofem::ProcessCommunicatorBuff.
|
inline |
|
pure virtual |
Reads count long values into array pointed by data.
Implemented in oofem::StaticCommunicationBuffer, oofem::DynamicCommunicationBuffer, oofem::FileDataStream, and oofem::ProcessCommunicatorBuff.
|
inline |
|
pure virtual |
Reads count double values into array pointed by data.
Implemented in oofem::StaticCommunicationBuffer, oofem::DynamicCommunicationBuffer, oofem::FileDataStream, and oofem::ProcessCommunicatorBuff.
|
inline |
|
pure virtual |
Reads count char values into array pointed by data.
Implemented in oofem::StaticCommunicationBuffer, oofem::DynamicCommunicationBuffer, oofem::FileDataStream, and oofem::ProcessCommunicatorBuff.
|
inline |
|
pure virtual |
Reads a bool value from data.
Implemented in oofem::CommunicationBuffer, oofem::FileDataStream, and oofem::ProcessCommunicatorBuff.
int oofem::DataStream::read | ( | std::string & | data | ) |
Reads a string (stored as an int for the length followed by char*).
Definition at line 41 of file datastream.C.
References read().
|
pure virtual |
Writes count integer values from array pointed by data.
Implemented in oofem::StaticCommunicationBuffer, oofem::DynamicCommunicationBuffer, oofem::FileDataStream, and oofem::ProcessCommunicatorBuff.
Referenced by oofem::ProcessCommunicatorBuff::givePackSizeOfLong(), oofem::MazarsNLMaterial::packUnknowns(), oofem::TrabBoneNL3D::packUnknowns(), oofem::MisesMatNl::packUnknowns(), oofem::RankineMatNl::packUnknowns(), oofem::IDNLMaterial::packUnknowns(), oofem::save_components(), oofem::B3SolidMaterialStatus::saveContext(), oofem::Eurocode2CreepMaterialStatus::saveContext(), oofem::PlasticMaterialStatus::saveContext(), oofem::PerfectlyPlasticMaterialStatus::saveContext(), oofem::MazarsMaterialStatus::saveContext(), oofem::BinghamFluidMaterial2Status::saveContext(), oofem::CebFipSlip90MaterialStatus::saveContext(), oofem::ProblemSequence::saveContext(), oofem::BondCEBMaterialStatus::saveContext(), oofem::IsoInterfaceDamageMaterialStatus::saveContext(), oofem::MPlasticMaterialStatus::saveContext(), oofem::IntMatIsoDamageStatus::saveContext(), oofem::IsoInterfaceDamageMaterialStatus_2::saveContext(), oofem::DruckerPragerPlasticitySMStatus::saveContext(), oofem::FRCFCMStatus::saveContext(), oofem::MPlasticMaterial2Status::saveContext(), oofem::Dictionary::saveContext(), oofem::RCSDEMaterialStatus::saveContext(), oofem::RCSDMaterialStatus::saveContext(), oofem::LinearConstraintBC::saveContext(), oofem::IDGMaterialStatus::saveContext(), oofem::SimpleSlaveDof::saveContext(), oofem::Lattice2d::saveContext(), oofem::MPSMaterialStatus::saveContext(), oofem::LEPlicElementInterface::saveContext(), oofem::HydrationModelStatus::saveContext(), oofem::Concrete2MaterialStatus::saveContext(), oofem::SlaveDof::saveContext(), oofem::NlDEIDynamic::saveContext(), oofem::FEMComponent::saveContext(), oofem::MasterDof::saveContext(), oofem::ConcreteDPMStatus::saveContext(), oofem::MPSDamMaterialStatus::saveContext(), oofem::IsotropicDamageMaterialStatus::saveContext(), oofem::TrabBone3DStatus::saveContext(), oofem::NonLinearStatic::saveContext(), oofem::AnisotropicDamageMaterialStatus::saveContext(), oofem::GeneralBoundaryCondition::saveContext(), oofem::LevelSetPCS::saveContext(), oofem::HuertaErrorEstimator::saveContext(), oofem::ConcreteDPM2Status::saveContext(), oofem::Node::saveContext(), oofem::TimeStep::saveContext(), oofem::XfemManager::saveContext(), oofem::SteelRelaxMatStatus::saveContext(), oofem::CylindricalALM::saveContext(), oofem::IntegrationRule::saveContext(), oofem::MisesMatStatus::saveContext(), oofem::PrimaryField::saveContext(), oofem::LatticeDamage2dStatus::saveContext(), oofem::RankineMatStatus::saveContext(), oofem::Dof::saveContext(), oofem::DofManager::saveContext(), oofem::Domain::saveContext(), oofem::EngngModel::saveContext(), oofem::Element::saveContext(), oofem::StressStrainBaseVector::storeYourself(), oofem::IntArray::storeYourself(), oofem::ExpCZMaterialStatus::updateYourself(), write(), and oofem::CommunicationBuffer::~CommunicationBuffer().
|
inline |
|
pure virtual |
Writes count unsigned long values from array pointed by data.
Implemented in oofem::StaticCommunicationBuffer, oofem::DynamicCommunicationBuffer, oofem::FileDataStream, and oofem::ProcessCommunicatorBuff.
|
inline |
|
pure virtual |
Writes count long values from array pointed by data.
Implemented in oofem::StaticCommunicationBuffer, oofem::DynamicCommunicationBuffer, oofem::FileDataStream, and oofem::ProcessCommunicatorBuff.
|
inline |
|
pure virtual |
Writes count double values from array pointed by data.
Implemented in oofem::StaticCommunicationBuffer, oofem::DynamicCommunicationBuffer, oofem::FileDataStream, and oofem::ProcessCommunicatorBuff.
|
inline |
|
pure virtual |
Writes count char values from array pointed by data.
Implemented in oofem::StaticCommunicationBuffer, oofem::DynamicCommunicationBuffer, oofem::FileDataStream, and oofem::ProcessCommunicatorBuff.
|
inline |
|
pure virtual |
Writes a bool value.
Implemented in oofem::CommunicationBuffer, oofem::FileDataStream, and oofem::ProcessCommunicatorBuff.
int oofem::DataStream::write | ( | const std::string & | data | ) |
Reads a string (stored as an int for the length followed by char*).
Definition at line 58 of file datastream.C.
References write().
|
inline |
Writes a string (wrapper needed, otherwise write(bool) is called )
Definition at line 113 of file datastream.h.
References write().
Referenced by write().