KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
|
Optimizes a 2D mesh by swapping the edges between elements. More...
#include <edge_swapping_2d_modeler.h>
Public Member Functions | |
Life Cycle | |
EdgeSwapping2DModeler () | |
Empty default constructor. More... | |
virtual | ~EdgeSwapping2DModeler () |
Empty destructor. More... | |
Operations | |
void | Remesh (ModelPart &rThisModelPart) |
void | WriteMesh (ModelPart &rThisModelPart, const std::string &Filename) |
Input and output | |
virtual std::string | Info () const override |
Turn back information as a string. More... | |
virtual void | PrintInfo (std::ostream &rOStream) const override |
Print information about this object. More... | |
virtual void | PrintData (std::ostream &rOStream) const override |
Print object's data. More... | |
Public Member Functions inherited from Kratos::Modeler | |
Modeler (Parameters ModelerParameters=Parameters()) | |
Default constructor. More... | |
Modeler (Model &rModel, Parameters ModelerParameters=Parameters()) | |
Constructor with Model. More... | |
virtual | ~Modeler ()=default |
Destructor. More... | |
virtual Modeler::Pointer | Create (Model &rModel, const Parameters ModelParameters) const |
Creates the Modeler Pointer. More... | |
virtual void | SetupGeometryModel () |
Import or generate geometry models from external input. More... | |
virtual void | PrepareGeometryModel () |
Prepare or update the geometry model_part. More... | |
virtual void | SetupModelPart () |
Convert the geometry model or import analysis suitable models. More... | |
virtual const Parameters | GetDefaultParameters () const |
This method provides the defaults parameters to avoid conflicts between the different constructors. More... | |
virtual void | GenerateModelPart (ModelPart &rOriginModelPart, ModelPart &rDestinationModelPart, Element const &rReferenceElement, Condition const &rReferenceBoundaryCondition) |
virtual void | GenerateMesh (ModelPart &ThisModelPart, Element const &rReferenceElement, Condition const &rReferenceBoundaryCondition) |
virtual void | GenerateNodes (ModelPart &ThisModelPart) |
KRATOS_CLASS_POINTER_DEFINITION (Modeler) | |
Pointer definition of Modeler. More... | |
Type Definitions | |
typedef Modeler | BaseType |
typedef Point | PointType |
typedef Node | NodeType |
typedef Geometry< NodeType > | GeometryType |
typedef PointerVector< NodeType > | NodesVectorType |
typedef std::size_t | SizeType |
KRATOS_CLASS_POINTER_DEFINITION (EdgeSwapping2DModeler) | |
Pointer definition of EdgeSwapping2DModeler. More... | |
Additional Inherited Members | |
Public Types inherited from Kratos::Modeler | |
typedef std::size_t | SizeType |
typedef std::size_t | IndexType |
Protected Attributes inherited from Kratos::Modeler | |
Parameters | mParameters |
SizeType | mEchoLevel |
Optimizes a 2D mesh by swapping the edges between elements.
This class can be used to optimized a 2D mesh modifying the connectivities of the elements. This modeler also collapses the nodes which are marked to be deleted. Nodes must be marked by setting the TO_ERASE in data value container (using Node::SetValue) to true. The algorithm consist of doing iteration over following steps:
Definition of the Modeler class as BaseType of EdgeSwapping2DModeler
A PointerVector of 3D Node class as array of nodes.
Defining 3D Node class as nodes of the mesh
typedef std::size_t Kratos::EdgeSwapping2DModeler::SizeType |
|
inline |
Empty default constructor.
|
inlinevirtual |
Empty destructor.
|
inlineoverridevirtual |
Turn back information as a string.
Reimplemented from Kratos::Modeler.
Kratos::EdgeSwapping2DModeler::KRATOS_CLASS_POINTER_DEFINITION | ( | EdgeSwapping2DModeler | ) |
Pointer definition of EdgeSwapping2DModeler.
|
inlineoverridevirtual |
Print object's data.
Reimplemented from Kratos::Modeler.
|
inlineoverridevirtual |
Print information about this object.
Reimplemented from Kratos::Modeler.
|
inline |
Remesh is the main method of this class and perform all the swapping and collapsing process. It accepts a ModelPart as its inputs and performs the remeshing process over its current mesh. The iterative process of finding pair of swapping elements and swap them is limited to maximum_repeat_number which is set to 10.
rThisModelPart | The model part containing the mesh to be remeshed |
|
inline |
An auxiliary method for writing the mesh for GiD for debugging purpose