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.
List of all members
Kratos::CadJsonInput< TNodeType, TEmbeddedNodeType > Class Template Reference

#include <cad_json_input.h>

Inheritance diagram for Kratos::CadJsonInput< TNodeType, TEmbeddedNodeType >:
Collaboration diagram for Kratos::CadJsonInput< TNodeType, TEmbeddedNodeType >:

Public Member Functions

Life Cycle
 CadJsonInput (const std::string &rDataFileName, SizeType EchoLevel=0)
 Constructor with path to input file. More...
 
 CadJsonInput (Parameters CadJsonParameters, SizeType EchoLevel=0)
 Constructor with KratosParameters. More...
 
 ~CadJsonInput ()=default
 Destructor. More...
 
Python exposed Functions
void ReadModelPart (ModelPart &rModelPart) override
 Adds all CAD geometries to the herin provided model_part. More...
 
- Public Member Functions inherited from Kratos::IO
 IO ()=default
 Default constructor. More...
 
virtual ~IO ()=default
 Destructor. More...
 
 IO (IO const &rOther)=delete
 Copy constructor. More...
 
IOoperator= (IO const &rOther)=delete
 Assignment operator. More...
 
virtual bool ReadNode (NodeType &rThisNode)
 This method reads one node. More...
 
virtual bool ReadNodes (NodesContainerType &rThisNodes)
 This method reads the nodes from an array of nodes. More...
 
virtual std::size_t ReadNodesNumber ()
 This method reads the number of nodes. More...
 
virtual void WriteNodes (NodesContainerType const &rThisNodes)
 This method writes the nodes from an array of nodes. More...
 
virtual void ReadProperties (Properties &rThisProperties)
 This method reads one Properties. More...
 
virtual void ReadProperties (PropertiesContainerType &rThisProperties)
 This method reads the Properties from an array of Properties. More...
 
virtual void WriteProperties (Properties const &rThisProperties)
 This method writes one Properties. More...
 
virtual void WriteProperties (PropertiesContainerType const &rThisProperties)
 This method writes the Properties from an array of Properties. More...
 
virtual void ReadGeometry (NodesContainerType &rThisNodes, GeometryType::Pointer &pThisGeometry)
 This method reads one geometry. More...
 
virtual void ReadGeometries (NodesContainerType &rThisNodes, GeometryContainerType &rThisGeometries)
 This method reads an array of geometries. More...
 
virtual std::size_t ReadGeometriesConnectivities (ConnectivitiesContainerType &rGeometriesConnectivities)
 This method reads the geometries connectivities. More...
 
virtual void WriteGeometries (GeometryContainerType const &rThisGeometries)
 This method writes an array of geometries. More...
 
virtual void ReadElement (NodesContainerType &rThisNodes, PropertiesContainerType &rThisProperties, Element::Pointer &pThisElement)
 This method reads one element. More...
 
virtual void ReadElements (NodesContainerType &rThisNodes, PropertiesContainerType &rThisProperties, ElementsContainerType &rThisElements)
 This method reads an array of elements. More...
 
virtual std::size_t ReadElementsConnectivities (ConnectivitiesContainerType &rElementsConnectivities)
 This method reads the elements connectivities. More...
 
virtual void WriteElements (ElementsContainerType const &rThisElements)
 This method writes an array of elements. More...
 
virtual void ReadCondition (NodesContainerType &rThisNodes, PropertiesContainerType &rThisProperties, Condition::Pointer &pThisCondition)
 This method reads one condition. More...
 
virtual void ReadConditions (NodesContainerType &rThisNodes, PropertiesContainerType &rThisProperties, ConditionsContainerType &rThisConditions)
 This method reads an array of conditions. More...
 
virtual std::size_t ReadConditionsConnectivities (ConnectivitiesContainerType &rConditionsConnectivities)
 This method reads the conditions connectivities. More...
 
virtual void WriteConditions (ConditionsContainerType const &rThisConditions)
 This method writes an array of conditions. More...
 
virtual void ReadInitialValues (ModelPart &rThisModelPart)
 This method reads the initial values of the model part. More...
 
virtual void ReadInitialValues (NodesContainerType &rThisNodes, ElementsContainerType &rThisElements, ConditionsContainerType &rThisConditions)
 This method reads the initial values of the nodes, elements and conditios. More...
 
virtual void ReadMesh (MeshType &rThisMesh)
 This method reads the mesh. More...
 
virtual void WriteMesh (MeshType &rThisMesh)
 This method writes the mesh. More...
 
virtual void WriteMesh (const MeshType &rThisMesh)
 This method writes the mesh. More...
 
virtual void WriteModelPart (ModelPart &rThisModelPart)
 This method writes the model part. More...
 
virtual void WriteModelPart (const ModelPart &rThisModelPart)
 This method writes the model part. More...
 
virtual void WriteNodeMesh (MeshType &rThisMesh)
 This method writes the node mesh. More...
 
virtual void WriteNodeMesh (const MeshType &rThisMesh)
 This method writes the node mesh. More...
 
virtual std::size_t ReadNodalGraph (ConnectivitiesContainerType &rAuxConnectivities)
 Read the input file and create the nodal connectivities graph, stored in CSR format. More...
 
virtual void DivideInputToPartitions (SizeType NumberOfPartitions, const PartitioningInfo &rPartitioningInfo)
 This method divides a model part into partitions. More...
 
virtual void DivideInputToPartitions (SizeType NumberOfPartitions, GraphType const &rDomainsColoredGraph, PartitionIndicesType const &rNodesPartitions, PartitionIndicesType const &rElementsPartitions, PartitionIndicesType const &rConditionsPartitions, PartitionIndicesContainerType const &rNodesAllPartitions, PartitionIndicesContainerType const &rElementsAllPartitions, PartitionIndicesContainerType const &rConditionsAllPartitions)
 This method divides a model part into partitions. More...
 
virtual void DivideInputToPartitions (Kratos::shared_ptr< std::iostream > *pStreams, SizeType NumberOfPartitions, const PartitioningInfo &rPartitioningInfo)
 This method divides a model part into partitions. More...
 
virtual void DivideInputToPartitions (Kratos::shared_ptr< std::iostream > *pStreams, SizeType NumberOfPartitions, GraphType const &rDomainsColoredGraph, PartitionIndicesType const &rNodesPartitions, PartitionIndicesType const &rElementsPartitions, PartitionIndicesType const &rConditionsPartitions, PartitionIndicesContainerType const &rNodesAllPartitions, PartitionIndicesContainerType const &rElementsAllPartitions, PartitionIndicesContainerType const &rConditionsAllPartitions)
 This method divides a model part into partitions. More...
 
virtual void ReadSubModelPartElementsAndConditionsIds (std::string const &rModelPartName, std::unordered_set< SizeType > &rElementsIds, std::unordered_set< SizeType > &rConditionsIds)
 
virtual std::size_t ReadNodalGraphFromEntitiesList (ConnectivitiesContainerType &rAuxConnectivities, std::unordered_set< SizeType > &rElementsIds, std::unordered_set< SizeType > &rConditionsIds)
 
virtual std::string Info () const
 Turn back information as a string. More...
 
virtual void PrintInfo (std::ostream &rOStream) const
 Print information about this object. More...
 
virtual void PrintData (std::ostream &rOStream) const
 Print object's data. More...
 
 KRATOS_CLASS_POINTER_DEFINITION (IO)
 Pointer definition of IO. More...
 
 KRATOS_DEFINE_LOCAL_FLAG (READ)
 Local Flags. More...
 
 KRATOS_DEFINE_LOCAL_FLAG (WRITE)
 
 KRATOS_DEFINE_LOCAL_FLAG (APPEND)
 
 KRATOS_DEFINE_LOCAL_FLAG (IGNORE_VARIABLES_ERROR)
 
 KRATOS_DEFINE_LOCAL_FLAG (SKIP_TIMER)
 
 KRATOS_DEFINE_LOCAL_FLAG (MESH_ONLY)
 
 KRATOS_DEFINE_LOCAL_FLAG (SCIENTIFIC_PRECISION)
 

Type Definitions

typedef std::size_t SizeType
 
typedef std::size_t IndexType
 
typedef Geometry< TNodeType > GeometryType
 
typedef GeometryType::Pointer GeometryPointerType
 
typedef PointerVector< TNodeType > ContainerNodeType
 
typedef PointerVector< TEmbeddedNodeType > ContainerEmbeddedNodeType
 
typedef CouplingGeometry< TNodeType > CouplingGeometryType
 
typedef NurbsSurfaceGeometry< 3, ContainerNodeTypeNurbsSurfaceType
 
typedef NurbsCurveGeometry< 2, ContainerEmbeddedNodeTypeNurbsTrimmingCurveType
 
typedef NurbsSurfaceType::Pointer NurbsSurfacePointerType
 
typedef NurbsTrimmingCurveType::Pointer NurbsTrimmingCurvePointerType
 
typedef BrepSurface< ContainerNodeType, ContainerEmbeddedNodeTypeBrepSurfaceType
 
typedef BrepCurveOnSurface< ContainerNodeType, ContainerEmbeddedNodeTypeBrepCurveOnSurfaceType
 
typedef BrepCurve< ContainerNodeType, ContainerEmbeddedNodeTypeBrepCurveType
 
typedef PointOnGeometry< ContainerNodeType, 3, 2 > PointOnGeometryOnSurfaceType
 
typedef PointOnGeometry< ContainerNodeType, 3, 1 > PointOnGeometryOnCurveType
 
typedef DenseVector< typename BrepCurveOnSurfaceType::Pointer > BrepCurveOnSurfaceArrayType
 
typedef DenseVector< typename BrepCurveOnSurfaceType::Pointer > BrepCurveOnSurfaceLoopType
 
typedef DenseVector< DenseVector< typename BrepCurveOnSurfaceType::Pointer > > BrepCurveOnSurfaceLoopArrayType
 
 KRATOS_CLASS_POINTER_DEFINITION (CadJsonInput)
 Pointer definition of CadJsonInput. More...
 

Additional Inherited Members

- Public Types inherited from Kratos::IO
typedef Node NodeType
 
typedef Geometry< NodeTypeGeometryType
 
typedef Mesh< NodeType, Properties, Element, ConditionMeshType
 
typedef MeshType::NodesContainerType NodesContainerType
 
typedef MeshType::PropertiesContainerType PropertiesContainerType
 
typedef ModelPart::GeometryContainerType GeometryContainerType
 
typedef MeshType::ElementsContainerType ElementsContainerType
 
typedef MeshType::ConditionsContainerType ConditionsContainerType
 
typedef std::vector< std::vector< std::size_t > > ConnectivitiesContainerType
 
typedef std::vector< std::vector< std::size_t > > PartitionIndicesContainerType
 
typedef std::vector< std::size_t > PartitionIndicesType
 
typedef std::size_t SizeType
 
typedef DenseMatrix< intGraphType
 

Detailed Description

template<class TNodeType = Node, class TEmbeddedNodeType = Point>
class Kratos::CadJsonInput< TNodeType, TEmbeddedNodeType >

Gives IO capabilities for Nurbs based Brep models in the JSON format defined in https://amses-journal.springeropen.com/articles/10.1186/s40323-018-0109-4.

Member Typedef Documentation

◆ BrepCurveOnSurfaceArrayType

template<class TNodeType = Node, class TEmbeddedNodeType = Point>
typedef DenseVector<typename BrepCurveOnSurfaceType::Pointer> Kratos::CadJsonInput< TNodeType, TEmbeddedNodeType >::BrepCurveOnSurfaceArrayType

◆ BrepCurveOnSurfaceLoopArrayType

template<class TNodeType = Node, class TEmbeddedNodeType = Point>
typedef DenseVector<DenseVector<typename BrepCurveOnSurfaceType::Pointer> > Kratos::CadJsonInput< TNodeType, TEmbeddedNodeType >::BrepCurveOnSurfaceLoopArrayType

◆ BrepCurveOnSurfaceLoopType

template<class TNodeType = Node, class TEmbeddedNodeType = Point>
typedef DenseVector<typename BrepCurveOnSurfaceType::Pointer> Kratos::CadJsonInput< TNodeType, TEmbeddedNodeType >::BrepCurveOnSurfaceLoopType

◆ BrepCurveOnSurfaceType

template<class TNodeType = Node, class TEmbeddedNodeType = Point>
typedef BrepCurveOnSurface<ContainerNodeType, ContainerEmbeddedNodeType> Kratos::CadJsonInput< TNodeType, TEmbeddedNodeType >::BrepCurveOnSurfaceType

◆ BrepCurveType

template<class TNodeType = Node, class TEmbeddedNodeType = Point>
typedef BrepCurve<ContainerNodeType, ContainerEmbeddedNodeType> Kratos::CadJsonInput< TNodeType, TEmbeddedNodeType >::BrepCurveType

◆ BrepSurfaceType

template<class TNodeType = Node, class TEmbeddedNodeType = Point>
typedef BrepSurface<ContainerNodeType, ContainerEmbeddedNodeType> Kratos::CadJsonInput< TNodeType, TEmbeddedNodeType >::BrepSurfaceType

◆ ContainerEmbeddedNodeType

template<class TNodeType = Node, class TEmbeddedNodeType = Point>
typedef PointerVector<TEmbeddedNodeType> Kratos::CadJsonInput< TNodeType, TEmbeddedNodeType >::ContainerEmbeddedNodeType

◆ ContainerNodeType

template<class TNodeType = Node, class TEmbeddedNodeType = Point>
typedef PointerVector<TNodeType> Kratos::CadJsonInput< TNodeType, TEmbeddedNodeType >::ContainerNodeType

◆ CouplingGeometryType

template<class TNodeType = Node, class TEmbeddedNodeType = Point>
typedef CouplingGeometry<TNodeType> Kratos::CadJsonInput< TNodeType, TEmbeddedNodeType >::CouplingGeometryType

◆ GeometryPointerType

template<class TNodeType = Node, class TEmbeddedNodeType = Point>
typedef GeometryType::Pointer Kratos::CadJsonInput< TNodeType, TEmbeddedNodeType >::GeometryPointerType

◆ GeometryType

template<class TNodeType = Node, class TEmbeddedNodeType = Point>
typedef Geometry<TNodeType> Kratos::CadJsonInput< TNodeType, TEmbeddedNodeType >::GeometryType

◆ IndexType

template<class TNodeType = Node, class TEmbeddedNodeType = Point>
typedef std::size_t Kratos::CadJsonInput< TNodeType, TEmbeddedNodeType >::IndexType

◆ NurbsSurfacePointerType

template<class TNodeType = Node, class TEmbeddedNodeType = Point>
typedef NurbsSurfaceType::Pointer Kratos::CadJsonInput< TNodeType, TEmbeddedNodeType >::NurbsSurfacePointerType

◆ NurbsSurfaceType

template<class TNodeType = Node, class TEmbeddedNodeType = Point>
typedef NurbsSurfaceGeometry<3, ContainerNodeType> Kratos::CadJsonInput< TNodeType, TEmbeddedNodeType >::NurbsSurfaceType

◆ NurbsTrimmingCurvePointerType

template<class TNodeType = Node, class TEmbeddedNodeType = Point>
typedef NurbsTrimmingCurveType::Pointer Kratos::CadJsonInput< TNodeType, TEmbeddedNodeType >::NurbsTrimmingCurvePointerType

◆ NurbsTrimmingCurveType

template<class TNodeType = Node, class TEmbeddedNodeType = Point>
typedef NurbsCurveGeometry<2, ContainerEmbeddedNodeType> Kratos::CadJsonInput< TNodeType, TEmbeddedNodeType >::NurbsTrimmingCurveType

◆ PointOnGeometryOnCurveType

template<class TNodeType = Node, class TEmbeddedNodeType = Point>
typedef PointOnGeometry<ContainerNodeType, 3, 1> Kratos::CadJsonInput< TNodeType, TEmbeddedNodeType >::PointOnGeometryOnCurveType

◆ PointOnGeometryOnSurfaceType

template<class TNodeType = Node, class TEmbeddedNodeType = Point>
typedef PointOnGeometry<ContainerNodeType, 3, 2> Kratos::CadJsonInput< TNodeType, TEmbeddedNodeType >::PointOnGeometryOnSurfaceType

◆ SizeType

template<class TNodeType = Node, class TEmbeddedNodeType = Point>
typedef std::size_t Kratos::CadJsonInput< TNodeType, TEmbeddedNodeType >::SizeType

Constructor & Destructor Documentation

◆ CadJsonInput() [1/2]

template<class TNodeType = Node, class TEmbeddedNodeType = Point>
Kratos::CadJsonInput< TNodeType, TEmbeddedNodeType >::CadJsonInput ( const std::string &  rDataFileName,
SizeType  EchoLevel = 0 
)
inline

Constructor with path to input file.

◆ CadJsonInput() [2/2]

template<class TNodeType = Node, class TEmbeddedNodeType = Point>
Kratos::CadJsonInput< TNodeType, TEmbeddedNodeType >::CadJsonInput ( Parameters  CadJsonParameters,
SizeType  EchoLevel = 0 
)
inline

Constructor with KratosParameters.

◆ ~CadJsonInput()

template<class TNodeType = Node, class TEmbeddedNodeType = Point>
Kratos::CadJsonInput< TNodeType, TEmbeddedNodeType >::~CadJsonInput ( )
default

Destructor.

Member Function Documentation

◆ KRATOS_CLASS_POINTER_DEFINITION()

template<class TNodeType = Node, class TEmbeddedNodeType = Point>
Kratos::CadJsonInput< TNodeType, TEmbeddedNodeType >::KRATOS_CLASS_POINTER_DEFINITION ( CadJsonInput< TNodeType, TEmbeddedNodeType >  )

Pointer definition of CadJsonInput.

◆ ReadModelPart()

template<class TNodeType = Node, class TEmbeddedNodeType = Point>
void Kratos::CadJsonInput< TNodeType, TEmbeddedNodeType >::ReadModelPart ( ModelPart rModelPart)
inlineoverridevirtual

Adds all CAD geometries to the herin provided model_part.

Reimplemented from Kratos::IO.


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