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.
Public Member Functions | Protected Member Functions | List of all members
CSharpKratosWrapper::ModelPartWrapper Class Reference

#include <model_part_wrapper.h>

Collaboration diagram for CSharpKratosWrapper::ModelPartWrapper:

Public Member Functions

 ModelPartWrapper (Kratos::ModelPart &mModelPart, std::vector< NodeType::Pointer > &fixedNodes)
 
 ModelPartWrapper (Kratos::ModelPart &mModelPart, std::vector< NodeType::Pointer > &fixedNodes, ModelPartWrapper *parent)
 
 ~ModelPartWrapper ()
 
ModelPartWrappergetSubmodelPart (char *name)
 
bool hasSubmodelPart (char *name)
 
float * getXCoordinates ()
 
float * getYCoordinates ()
 
float * getZCoordinates ()
 
int getNodesCount ()
 
int * getTriangles ()
 
int getTrianglesCount ()
 
void updateNodePos (const int nodeId, const float x, const float y, const float z)
 
void retrieveResults ()
 
void enableSurfaceStressResults ()
 
float * getSurfaceStress ()
 
ModelPartgetKratosModelPart ()
 
void recreateProcessedMesh ()
 
ModelPartWrappercreateSubmodelPart (char *name)
 
NodeTypecreateNewNode (int id, double x, double y, double z)
 
ElementTypecreateNewElement (char *name, int id, int *nodeIds)
 
ConditionTypecreateNew2dCondition (char *name, int id, int *nodeIds)
 
void removeNode (int id)
 
void removeElement (int id)
 
void removeCondition (int id)
 
void addNodes (int *nodeIds, int nodeCount)
 
void addElements (int *elementIds, int elementCount)
 
void addConditions (int *conditionIds, int elementCount)
 
int getMaxElementId ()
 
int getMaxNodeId ()
 
NodeTypegetNode (int id)
 
NodeType ** getNodes ()
 
int getNumberOfNodes ()
 
ElementTypegetElement (int id)
 
ElementType ** getElements ()
 
int getNumberOfElements ()
 
ConditionTypegetCondition (int id)
 
ConditionType ** getConditions ()
 
int getNumberOfConditions ()
 
IdTranslatorgetIdTranslator ()
 
double * getNodalVariable1d (Kratos::Variable< double > &variable)
 
double * getNodalVariable3d (Kratos::Variable< Kratos::array_1d< double, 3 >> &variable)
 
bool hasNodalVariable1d (Kratos::Variable< double > &variable)
 
bool hasNodalVariable3d (Kratos::Variable< Kratos::array_1d< double, 3 >> &variable)
 

Protected Member Functions

void updateMaxElementId (int maxId)
 
void updateMaxNodeId (int maxId)
 

Constructor & Destructor Documentation

◆ ModelPartWrapper() [1/2]

CSharpKratosWrapper::ModelPartWrapper::ModelPartWrapper ( Kratos::ModelPart mModelPart,
std::vector< NodeType::Pointer > &  fixedNodes 
)
inline

◆ ModelPartWrapper() [2/2]

CSharpKratosWrapper::ModelPartWrapper::ModelPartWrapper ( Kratos::ModelPart mModelPart,
std::vector< NodeType::Pointer > &  fixedNodes,
ModelPartWrapper parent 
)
inline

◆ ~ModelPartWrapper()

ModelPartWrapper::~ModelPartWrapper ( )

Member Function Documentation

◆ addConditions()

void ModelPartWrapper::addConditions ( int *  conditionIds,
int  elementCount 
)

◆ addElements()

void ModelPartWrapper::addElements ( int *  elementIds,
int  elementCount 
)

◆ addNodes()

void ModelPartWrapper::addNodes ( int *  nodeIds,
int  nodeCount 
)

◆ createNew2dCondition()

ConditionType * ModelPartWrapper::createNew2dCondition ( char *  name,
int  id,
int *  nodeIds 
)

◆ createNewElement()

ElementType * ModelPartWrapper::createNewElement ( char *  name,
int  id,
int *  nodeIds 
)

◆ createNewNode()

NodeType * ModelPartWrapper::createNewNode ( int  id,
double  x,
double  y,
double  z 
)

◆ createSubmodelPart()

ModelPartWrapper * ModelPartWrapper::createSubmodelPart ( char *  name)

◆ enableSurfaceStressResults()

void ModelPartWrapper::enableSurfaceStressResults ( )

Enables calculation of surface stress values. Call retrieveResults after each simulation to recalculate stress.

◆ getCondition()

ConditionType * ModelPartWrapper::getCondition ( int  id)

◆ getConditions()

ConditionType ** ModelPartWrapper::getConditions ( )

◆ getElement()

ElementType * ModelPartWrapper::getElement ( int  id)

◆ getElements()

ElementType ** ModelPartWrapper::getElements ( )

◆ getIdTranslator()

IdTranslator * ModelPartWrapper::getIdTranslator ( )

◆ getKratosModelPart()

ModelPart & ModelPartWrapper::getKratosModelPart ( )

◆ getMaxElementId()

int ModelPartWrapper::getMaxElementId ( )

◆ getMaxNodeId()

int ModelPartWrapper::getMaxNodeId ( )

◆ getNodalVariable1d()

double * ModelPartWrapper::getNodalVariable1d ( Kratos::Variable< double > &  variable)

◆ getNodalVariable3d()

double * ModelPartWrapper::getNodalVariable3d ( Kratos::Variable< Kratos::array_1d< double, 3 >> &  variable)

◆ getNode()

NodeType * ModelPartWrapper::getNode ( int  id)

◆ getNodes()

NodeType ** ModelPartWrapper::getNodes ( )

◆ getNodesCount()

int ModelPartWrapper::getNodesCount ( )

◆ getNumberOfConditions()

int ModelPartWrapper::getNumberOfConditions ( )

◆ getNumberOfElements()

int ModelPartWrapper::getNumberOfElements ( )

◆ getNumberOfNodes()

int ModelPartWrapper::getNumberOfNodes ( )

◆ getSubmodelPart()

ModelPartWrapper * ModelPartWrapper::getSubmodelPart ( char *  name)

◆ getSurfaceStress()

float * ModelPartWrapper::getSurfaceStress ( )

◆ getTriangles()

int * ModelPartWrapper::getTriangles ( )

◆ getTrianglesCount()

int ModelPartWrapper::getTrianglesCount ( )

◆ getXCoordinates()

float * ModelPartWrapper::getXCoordinates ( )

◆ getYCoordinates()

float * ModelPartWrapper::getYCoordinates ( )

◆ getZCoordinates()

float * ModelPartWrapper::getZCoordinates ( )

◆ hasNodalVariable1d()

bool ModelPartWrapper::hasNodalVariable1d ( Kratos::Variable< double > &  variable)

◆ hasNodalVariable3d()

bool ModelPartWrapper::hasNodalVariable3d ( Kratos::Variable< Kratos::array_1d< double, 3 >> &  variable)

◆ hasSubmodelPart()

bool ModelPartWrapper::hasSubmodelPart ( char *  name)

◆ recreateProcessedMesh()

void ModelPartWrapper::recreateProcessedMesh ( )

Recreates surface mesh after changes to its structure, like creation of new nodes and elements

◆ removeCondition()

void ModelPartWrapper::removeCondition ( int  id)

◆ removeElement()

void ModelPartWrapper::removeElement ( int  id)

◆ removeNode()

void ModelPartWrapper::removeNode ( int  id)

◆ retrieveResults()

void ModelPartWrapper::retrieveResults ( )

Extracts new node positions and stress values

◆ updateMaxElementId()

void ModelPartWrapper::updateMaxElementId ( int  maxId)
protected

◆ updateMaxNodeId()

void ModelPartWrapper::updateMaxNodeId ( int  maxId)
protected

◆ updateNodePos()

void ModelPartWrapper::updateNodePos ( const int  nodeId,
const float  x,
const float  y,
const float  z 
)

Fixes and updates DISPLACEMENT variable of a node, so that final position is as given. X0 + DISPLACEMENT_X = x

Parameters
nodeIdSurface id of the node to update
xX coordinate
yY coordinate
zZ coordinate

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