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.
Variables
generate_mesh_tying_mortar_condition Namespace Reference

Variables

bool do_simplifications = False
 
string mode = "c"
 
bool impose_partion_of_unity = False
 
list dim_combinations = [2,2,2,2,3,3,3,3,3,3,3,3]
 
list nnodeselement_combinations = [2,2,3,3,4,4,3,3,4,4]
 
list nnodeselement_master_combinations = [2,2,3,3,4,4,4,4,3,3]
 
list tensor_combinations = [1,2,1,2,1,3,1,3,1,3,1,3]
 
string lhs_string = ""
 
string lhs_template_begin_string = "\n/***********************************************************************************/\n/***********************************************************************************/\n\ntemplate< >\ntemplate< >\nvoid MeshTyingMortarCondition<TDim,TNumNodesElem,TNumNodesElemMaster>::CalculateLocalLHS<MeshTyingMortarCondition<TDim,TNumNodesElem,TNumNodesElemMaster>::TTensor>(\n Matrix& rLocalLHS,\n const MortarConditionMatrices& rMortarConditionMatrices,\n const DofData<TTensor>& rDofData\n )\n{\n // We get the mortar operators\n const BoundedMatrix<double, TNumNodes, TNumNodesMaster>& MOperator = rMortarConditionMatrices.MOperator;\n const BoundedMatrix<double, TNumNodes, TNumNodes>& DOperator = rMortarConditionMatrices.DOperator;\n"
 
string lhs_template_end_string = "\n}\n"
 
string rhs_string = ""
 
string rhs_template_begin_string = "\n/***********************************************************************************/\n/***********************************************************************************/\n\ntemplate<>\ntemplate<>\nvoid MeshTyingMortarCondition<TDim,TNumNodesElem, TNumNodesElemMaster>::CalculateLocalRHS<MeshTyingMortarCondition<TDim,TNumNodesElem,TNumNodesElemMaster>::TTensor>(\n Vector& rLocalRHS,\n const MortarConditionMatrices& rMortarConditionMatrices,\n const DofData<TTensor>& rDofData\n )\n{\n // Initialize values\n const BoundedMatrix<double, TNumNodes, TTensor>& u1 = rDofData.u1;\n const BoundedMatrix<double, TNumNodesMaster, TTensor>& u2 = rDofData.u2;\n\n const BoundedMatrix<double, TNumNodes, TTensor>& lm = rDofData.LagrangeMultipliers; \n\n // Mortar operators\n const BoundedMatrix<double, TNumNodes, TNumNodesMaster>& MOperator = rMortarConditionMatrices.MOperator;\n const BoundedMatrix<double, TNumNodes, TNumNodes>& DOperator = rMortarConditionMatrices.DOperator;\n"
 
string rhs_template_end_string = "\n}\n"
 
int nnodes = 2
 
int nnodes_master = 2
 
 number_dof = tensor * (nnodes_master + 2 * nnodes)
 
 u1 = custom_sympy_fe_utilities.DefineMatrix('u1',nnodes,tensor)
 
 u2 = custom_sympy_fe_utilities.DefineMatrix('u2',nnodes_master,tensor)
 
 lm = custom_sympy_fe_utilities.DefineMatrix('lm',nnodes,tensor)
 
 w1 = custom_sympy_fe_utilities.DefineMatrix('w1',nnodes,tensor)
 
 w2 = custom_sympy_fe_utilities.DefineMatrix('w2',nnodes_master,tensor)
 
 wlm = custom_sympy_fe_utilities.DefineMatrix('wlm',nnodes, tensor)
 
 DOperator = custom_sympy_fe_utilities.DefineMatrix('DOperator',nnodes,nnodes)
 
 MOperator = custom_sympy_fe_utilities.DefineMatrix('MOperator',nnodes,nnodes_master)
 
 dofs = sympy.Matrix( sympy.zeros(number_dof, 1) )
 
 testfunc = sympy.Matrix( sympy.zeros(number_dof, 1) )
 
int count = 0
 
 Du1Mu2 = DOperator * u1 - MOperator * u2
 FUNCTIONAL DEFINITION ############################. More...
 
 Dw1Mw2 = DOperator * w1 - MOperator * w2
 
int rv_galerkin = 0
 
 rv = sympy.Matrix( sympy.zeros(1, 1) )
 Complete functional. More...
 
 rhs
 
 lhs
 
 lhs_out = custom_sympy_fe_utilities.OutputMatrix_CollectingFactors(lhs,"lhs", mode, 1, number_dof)
 
 rhs_out = custom_sympy_fe_utilities.OutputVector_CollectingFactors(rhs,"rhs", mode, 1, number_dof)
 
 input = open("mesh_tying_mortar_condition_template.cpp",'r').read()
 FINAL SAVING ##############################. More...
 
 outputstring = input.replace("// replace_lhs", lhs_string)
 
 output = open("mesh_tying_mortar_condition.cpp",'w')
 

Variable Documentation

◆ count

int generate_mesh_tying_mortar_condition.count = 0

◆ dim_combinations

list generate_mesh_tying_mortar_condition.dim_combinations = [2,2,2,2,3,3,3,3,3,3,3,3]

◆ do_simplifications

bool generate_mesh_tying_mortar_condition.do_simplifications = False

◆ dofs

generate_mesh_tying_mortar_condition.dofs = sympy.Matrix( sympy.zeros(number_dof, 1) )

◆ DOperator

generate_mesh_tying_mortar_condition.DOperator = custom_sympy_fe_utilities.DefineMatrix('DOperator',nnodes,nnodes)

◆ Du1Mu2

generate_mesh_tying_mortar_condition.Du1Mu2 = DOperator * u1 - MOperator * u2

FUNCTIONAL DEFINITION ############################.

◆ Dw1Mw2

generate_mesh_tying_mortar_condition.Dw1Mw2 = DOperator * w1 - MOperator * w2

◆ impose_partion_of_unity

bool generate_mesh_tying_mortar_condition.impose_partion_of_unity = False

◆ input

generate_mesh_tying_mortar_condition.input = open("mesh_tying_mortar_condition_template.cpp",'r').read()

FINAL SAVING ##############################.

◆ lhs

generate_mesh_tying_mortar_condition.lhs

◆ lhs_out

generate_mesh_tying_mortar_condition.lhs_out = custom_sympy_fe_utilities.OutputMatrix_CollectingFactors(lhs,"lhs", mode, 1, number_dof)

◆ lhs_string

string generate_mesh_tying_mortar_condition.lhs_string = ""

◆ lhs_template_begin_string

string generate_mesh_tying_mortar_condition.lhs_template_begin_string = "\n/***********************************************************************************/\n/***********************************************************************************/\n\ntemplate< >\ntemplate< >\nvoid MeshTyingMortarCondition<TDim,TNumNodesElem,TNumNodesElemMaster>::CalculateLocalLHS<MeshTyingMortarCondition<TDim,TNumNodesElem,TNumNodesElemMaster>::TTensor>(\n Matrix& rLocalLHS,\n const MortarConditionMatrices& rMortarConditionMatrices,\n const DofData<TTensor>& rDofData\n )\n{\n // We get the mortar operators\n const BoundedMatrix<double, TNumNodes, TNumNodesMaster>& MOperator = rMortarConditionMatrices.MOperator;\n const BoundedMatrix<double, TNumNodes, TNumNodes>& DOperator = rMortarConditionMatrices.DOperator;\n"

◆ lhs_template_end_string

string generate_mesh_tying_mortar_condition.lhs_template_end_string = "\n}\n"

◆ lm

generate_mesh_tying_mortar_condition.lm = custom_sympy_fe_utilities.DefineMatrix('lm',nnodes,tensor)

◆ mode

string generate_mesh_tying_mortar_condition.mode = "c"

◆ MOperator

generate_mesh_tying_mortar_condition.MOperator = custom_sympy_fe_utilities.DefineMatrix('MOperator',nnodes,nnodes_master)

◆ nnodes

int generate_mesh_tying_mortar_condition.nnodes = 2

◆ nnodes_master

int generate_mesh_tying_mortar_condition.nnodes_master = 2

◆ nnodeselement_combinations

list generate_mesh_tying_mortar_condition.nnodeselement_combinations = [2,2,3,3,4,4,3,3,4,4]

◆ nnodeselement_master_combinations

list generate_mesh_tying_mortar_condition.nnodeselement_master_combinations = [2,2,3,3,4,4,4,4,3,3]

◆ number_dof

generate_mesh_tying_mortar_condition.number_dof = tensor * (nnodes_master + 2 * nnodes)

◆ output

generate_mesh_tying_mortar_condition.output = open("mesh_tying_mortar_condition.cpp",'w')

◆ outputstring

generate_mesh_tying_mortar_condition.outputstring = input.replace("// replace_lhs", lhs_string)

◆ rhs

generate_mesh_tying_mortar_condition.rhs

◆ rhs_out

generate_mesh_tying_mortar_condition.rhs_out = custom_sympy_fe_utilities.OutputVector_CollectingFactors(rhs,"rhs", mode, 1, number_dof)

◆ rhs_string

string generate_mesh_tying_mortar_condition.rhs_string = ""

◆ rhs_template_begin_string

string generate_mesh_tying_mortar_condition.rhs_template_begin_string = "\n/***********************************************************************************/\n/***********************************************************************************/\n\ntemplate<>\ntemplate<>\nvoid MeshTyingMortarCondition<TDim,TNumNodesElem, TNumNodesElemMaster>::CalculateLocalRHS<MeshTyingMortarCondition<TDim,TNumNodesElem,TNumNodesElemMaster>::TTensor>(\n Vector& rLocalRHS,\n const MortarConditionMatrices& rMortarConditionMatrices,\n const DofData<TTensor>& rDofData\n )\n{\n // Initialize values\n const BoundedMatrix<double, TNumNodes, TTensor>& u1 = rDofData.u1;\n const BoundedMatrix<double, TNumNodesMaster, TTensor>& u2 = rDofData.u2;\n\n const BoundedMatrix<double, TNumNodes, TTensor>& lm = rDofData.LagrangeMultipliers; \n\n // Mortar operators\n const BoundedMatrix<double, TNumNodes, TNumNodesMaster>& MOperator = rMortarConditionMatrices.MOperator;\n const BoundedMatrix<double, TNumNodes, TNumNodes>& DOperator = rMortarConditionMatrices.DOperator;\n"

◆ rhs_template_end_string

string generate_mesh_tying_mortar_condition.rhs_template_end_string = "\n}\n"

◆ rv

generate_mesh_tying_mortar_condition.rv = sympy.Matrix( sympy.zeros(1, 1) )

Complete functional.

◆ rv_galerkin

generate_mesh_tying_mortar_condition.rv_galerkin = 0

◆ tensor_combinations

list generate_mesh_tying_mortar_condition.tensor_combinations = [1,2,1,2,1,3,1,3,1,3,1,3]

◆ testfunc

generate_mesh_tying_mortar_condition.testfunc = sympy.Matrix( sympy.zeros(number_dof, 1) )

◆ u1

generate_mesh_tying_mortar_condition.u1 = custom_sympy_fe_utilities.DefineMatrix('u1',nnodes,tensor)

◆ u2

generate_mesh_tying_mortar_condition.u2 = custom_sympy_fe_utilities.DefineMatrix('u2',nnodes_master,tensor)

◆ w1

generate_mesh_tying_mortar_condition.w1 = custom_sympy_fe_utilities.DefineMatrix('w1',nnodes,tensor)

◆ w2

generate_mesh_tying_mortar_condition.w2 = custom_sympy_fe_utilities.DefineMatrix('w2',nnodes_master,tensor)

◆ wlm

generate_mesh_tying_mortar_condition.wlm = custom_sympy_fe_utilities.DefineMatrix('wlm',nnodes, tensor)