103 mpGeometry(rOther.mpGeometry)
133 mpGeometry = pGeometry;
209 return pGetGeometry()->GetData();
214 return pGetGeometry()->GetData();
219 return GetGeometry().GetData();
224 return GetGeometry().SetData(rThisData);
232 return GetData().Has(rThisVariable);
239 const TVariableType& rThisVariable,
240 typename TVariableType::Type
const& rValue)
242 GetData().SetValue(rThisVariable, rValue);
248 template<
class TVariableType>
typename TVariableType::Type&
GetValue(
249 const TVariableType& rThisVariable)
251 return GetData().GetValue(rThisVariable);
254 template<
class TVariableType>
typename TVariableType::Type
const&
GetValue(
255 const TVariableType& rThisVariable)
const
257 return GetData().GetValue(rThisVariable);
268 bool IsActive()
const;
275 return (
typeid(rLHS) ==
typeid(rRHS));
323 std::string
Info()
const override
325 std::stringstream buffer;
326 buffer <<
"Geometrical object # "
346 return mReferenceCounter;
403 GeometryType::Pointer mpGeometry;
411 mutable std::atomic<int> mReferenceCounter{0};
415 x->mReferenceCounter.fetch_add(1, std::memory_order_relaxed);
420 if (
x->mReferenceCounter.fetch_sub(1, std::memory_order_release) == 1) {
421 std::atomic_thread_fence(std::memory_order_acquire);
439 void save(
Serializer& rSerializer)
const override
443 rSerializer.
save(
"Geometry",mpGeometry);
450 rSerializer.
load(
"Geometry",mpGeometry);
493 rOStream << std::endl;
std::string Info() const override
Turn back information as a string.
Definition: periodic_interface_process.hpp:93
Container for storing data values associated with variables.
Definition: data_value_container.h:63
std::size_t IndexType
Definition: flags.h:74
Flags & operator=(Flags const &rOther)
Assignment operator.
Definition: flags.h:151
This defines the geometrical object, base definition of the element and condition entities.
Definition: geometrical_object.h:58
GeometryType const & GetGeometry() const
Returns the reference of the geometry (const version)
Definition: geometrical_object.h:167
static bool HasSameGeometryType(const GeometricalObject &rLHS, const GeometricalObject &rRHS)
Checks if two GeometricalObject have the same geometry type.
Definition: geometrical_object.h:290
GeometricalObject(GeometricalObject const &rOther)
Copy constructor.
Definition: geometrical_object.h:100
friend void intrusive_ptr_release(const GeometricalObject *x)
Definition: geometrical_object.h:418
GeometryType::Pointer pGetGeometry()
Returns the pointer to the geometry.
Definition: geometrical_object.h:140
TVariableType::Type & GetValue(const TVariableType &rThisVariable)
Definition: geometrical_object.h:248
Flags & GetFlags()
Returns the flags of the object.
Definition: geometrical_object.h:176
std::string Info() const override
Turn back information as a string.
Definition: geometrical_object.h:323
void SetData(DataValueContainer const &rThisData)
Definition: geometrical_object.h:222
void SetFlags(Flags const &rThisFlags)
Sets the flags of the object.
Definition: geometrical_object.h:194
virtual void SetGeometry(GeometryType::Pointer pGeometry)
Sets the pointer to the geometry.
Definition: geometrical_object.h:131
Geometry< NodeType > GeometryType
The geometry type definition.
Definition: geometrical_object.h:70
GeometryType & GetGeometry()
Returns the reference of the geometry.
Definition: geometrical_object.h:158
Node NodeType
Definition of the node type.
Definition: geometrical_object.h:67
static bool IsSame(const GeometricalObject *rLHS, const GeometricalObject *rRHS)
Checks if two GeometricalObject are the same (pointer version)
Definition: geometrical_object.h:314
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: geometrical_object.h:338
GeometricalObject & operator=(GeometricalObject const &rOther)
Assignment operator.
Definition: geometrical_object.h:112
Flags const & GetFlags() const
Returns the flags of the object (const version)
Definition: geometrical_object.h:185
GeometricalObject(IndexType NewId=0)
Default constructor.
Definition: geometrical_object.h:83
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(GeometricalObject)
Pointer definition of GeometricalObject.
DataValueContainer const & GetData() const
Definition: geometrical_object.h:217
const GeometryType::Pointer pGetGeometry() const
Returns the pointer to the geometry (const version)
Definition: geometrical_object.h:149
static bool HasSameGeometryType(const GeometricalObject *rLHS, const GeometricalObject *rRHS)
Checks if two GeometricalObject have the same geometry type (pointer version)
Definition: geometrical_object.h:298
static bool HasSameType(const GeometricalObject *rLHS, const GeometricalObject *rRHS)
Checks if two GeometricalObject have the same type (pointer version)
Definition: geometrical_object.h:282
bool Has(const Variable< TDataType > &rThisVariable) const
Definition: geometrical_object.h:230
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: geometrical_object.h:332
GeometricalObject(IndexType NewId, GeometryType::Pointer pGeometry)
Default constructor.
Definition: geometrical_object.h:90
std::size_t IndexType
Defines the index type.
Definition: geometrical_object.h:73
DataValueContainer & GetData()
Definition: geometrical_object.h:212
~GeometricalObject() override
Destructor.
Definition: geometrical_object.h:97
void SetValue(const TVariableType &rThisVariable, typename TVariableType::Type const &rValue)
Definition: geometrical_object.h:238
unsigned int use_count() const noexcept
Definition: geometrical_object.h:344
static bool IsSame(const GeometricalObject &rLHS, const GeometricalObject &rRHS)
Checks if two GeometricalObject are the same.
Definition: geometrical_object.h:306
std::size_t result_type
Defines the result type.
Definition: geometrical_object.h:76
TVariableType::Type const & GetValue(const TVariableType &rThisVariable) const
Definition: geometrical_object.h:254
static bool HasSameType(const GeometricalObject &rLHS, const GeometricalObject &rRHS)
Checks if two GeometricalObject have the same type.
Definition: geometrical_object.h:274
friend void intrusive_ptr_add_ref(const GeometricalObject *x)
Definition: geometrical_object.h:413
Geometry base class.
Definition: geometry.h:71
virtual GeometryData::KratosGeometryType GetGeometryType() const
Definition: geometry.h:381
This object defines an indexed object.
Definition: indexed_object.h:54
IndexedObject & operator=(IndexedObject const &rOther)
Assignment operator.
Definition: indexed_object.h:86
This class defines the node.
Definition: node.h:65
The serialization consists in storing the state of an object into a storage format like data file or ...
Definition: serializer.h:123
void load(std::string const &rTag, TDataType &rObject)
Definition: serializer.h:207
void save(std::string const &rTag, std::array< TDataType, TDataSize > const &rObject)
Definition: serializer.h:545
Variable class contains all information needed to store and retrive data from a data container.
Definition: variable.h:63
#define KRATOS_SERIALIZE_SAVE_BASE_CLASS(Serializer, BaseType)
Definition: define.h:812
#define KRATOS_SERIALIZE_LOAD_BASE_CLASS(Serializer, BaseType)
Definition: define.h:815
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
std::istream & operator>>(std::istream &rIStream, LinearMasterSlaveConstraint &rThis)
input stream function
namespace KRATOS_DEPRECATED_MESSAGE("Please use std::filesystem directly") filesystem
Definition: kratos_filesystem.h:33
std::ostream & operator<<(std::ostream &rOStream, const LinearMasterSlaveConstraint &rThis)
output stream function
Definition: linear_master_slave_constraint.h:432
def load(f)
Definition: ode_solve.py:307
tuple const
Definition: ode_solve.py:403
x
Definition: sensitivityMatrix.py:49