10 #if !defined(KRATOS_FIX_SCALAR_PFEM_DOF_PROCESS_H_INCLUDED)
11 #define KRATOS_FIX_SCALAR_PFEM_DOF_PROCESS_H_INCLUDED
50 "model_part_name":"PLEASE_CHOOSE_MODEL_PART_NAME",
51 "variable_name": "PLEASE_PRESCRIBE_VARIABLE_NAME"
57 mvariable_name = rParameters[
"variable_name"].
GetString();
63 KRATOS_THROW_ERROR(std::runtime_error,
"trying to set a variable that is not in the model_part - variable name is ", mvariable_name);
70 KRATOS_THROW_ERROR(std::runtime_error,
"trying to set a variable that is not in the model_part - variable name is ", mvariable_name);
77 KRATOS_THROW_ERROR(std::runtime_error,
"trying to set a variable that is not in the model_part - variable name is ", mvariable_name);
89 if (
model_part.GetNodalSolutionStepVariablesList().Has(rVariable) ==
false)
91 KRATOS_THROW_ERROR(std::runtime_error,
"trying to set a variable that is not in the model_part - variable name is ", rVariable);
94 mvariable_name = rVariable.
Name();
104 if (
model_part.GetNodalSolutionStepVariablesList().Has(rVariable) ==
false)
106 KRATOS_THROW_ERROR(std::runtime_error,
"Trying to set a variable that is not in the model_part - variable name is ", rVariable);
109 mvariable_name = rVariable.
Name();
119 if (
model_part.GetNodalSolutionStepVariablesList().Has(rVariable) ==
false)
121 KRATOS_THROW_ERROR(std::runtime_error,
"Trying to set a variable that is not in the model_part - variable name is ", rVariable);
124 mvariable_name = rVariable.
Name();
158 KRATOS_THROW_ERROR(std::logic_error,
"Not able to set the variable. Attempting to set variable:", mvariable_name);
215 std::string
Info()
const override
217 return "FixScalarPfemDofProcess";
223 rOStream <<
"FixScalarPfemDofProcess";
271 std::string mvariable_name;
277 template <
class TVarType>
278 void InternalFixDof(TVarType &rVar)
280 const int nnodes = mrModelPart.GetMesh().Nodes().size();
284 ModelPart::NodesContainerType::iterator it_begin = mrModelPart.GetMesh().NodesBegin();
286 #pragma omp parallel for
289 ModelPart::NodesContainerType::iterator it = it_begin +
i;
336 rOStream << std::endl;
The base class for fixing scalar variable Dof or array_1d component Dof processes in Kratos.
Definition: fix_scalar_pfem_dof_process.hpp:32
FixScalarPfemDofProcess(ModelPart &model_part, Parameters rParameters)
Definition: fix_scalar_pfem_dof_process.hpp:43
KRATOS_CLASS_POINTER_DEFINITION(FixScalarPfemDofProcess)
Pointer definition of FixScalarPfemDofProcess.
void ExecuteFinalize() override
Definition: fix_scalar_pfem_dof_process.hpp:198
void ExecuteInitializeSolutionStep() override
this function will be executed at every time step BEFORE performing the solve phase
Definition: fix_scalar_pfem_dof_process.hpp:177
void ExecuteInitialize() override
Definition: fix_scalar_pfem_dof_process.hpp:166
FixScalarPfemDofProcess(ModelPart &model_part, const Variable< bool > &rVariable)
Definition: fix_scalar_pfem_dof_process.hpp:114
FixScalarPfemDofProcess(ModelPart &model_part, const Variable< double > &rVariable)
Definition: fix_scalar_pfem_dof_process.hpp:84
void operator()()
This operator is provided to call the process as a function and simply calls the Execute method.
Definition: fix_scalar_pfem_dof_process.hpp:137
void ExecuteBeforeSolutionLoop() override
Definition: fix_scalar_pfem_dof_process.hpp:172
void ExecuteAfterOutputStep() override
this function will be executed at every time step AFTER writing the output
Definition: fix_scalar_pfem_dof_process.hpp:192
void Execute() override
Execute method is used to execute the FixScalarPfemDofProcess algorithms.
Definition: fix_scalar_pfem_dof_process.hpp:147
void ExecuteFinalizeSolutionStep() override
this function will be executed at every time step AFTER performing the solve phase
Definition: fix_scalar_pfem_dof_process.hpp:182
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: fix_scalar_pfem_dof_process.hpp:227
std::string Info() const override
Turn back information as a string.
Definition: fix_scalar_pfem_dof_process.hpp:215
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: fix_scalar_pfem_dof_process.hpp:221
FixScalarPfemDofProcess(FixScalarPfemDofProcess const &rOther)
Copy constructor.
FixScalarPfemDofProcess(ModelPart &model_part, const Variable< int > &rVariable)
Definition: fix_scalar_pfem_dof_process.hpp:99
void ExecuteBeforeOutputStep() override
this function will be executed at every time step BEFORE writing the output
Definition: fix_scalar_pfem_dof_process.hpp:187
~FixScalarPfemDofProcess() override
Destructor.
Definition: fix_scalar_pfem_dof_process.hpp:130
KratosComponents class encapsulates a lookup table for a family of classes in a generic way.
Definition: kratos_components.h:49
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
This class provides to Kratos a data structure for I/O based on the standard of JSON.
Definition: kratos_parameters.h:59
void ValidateAndAssignDefaults(const Parameters &rDefaultParameters)
This function is designed to verify that the parameters under testing match the form prescribed by th...
Definition: kratos_parameters.cpp:1306
std::string GetString() const
This method returns the string contained in the current Parameter.
Definition: kratos_parameters.cpp:684
The base class for all processes in Kratos.
Definition: process.h:49
const std::string & Name() const
Definition: variable_data.h:201
#define KRATOS_THROW_ERROR(ExceptionType, ErrorMessage, MoreInfo)
Definition: define.h:77
#define KRATOS_CATCH(MoreInfo)
Definition: define.h:110
#define KRATOS_TRY
Definition: define.h:109
bool Has(const std::string &ModelerName)
Checks if the modeler is registered.
Definition: modeler_factory.cpp:24
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
std::ostream & operator<<(std::ostream &rOStream, const LinearMasterSlaveConstraint &rThis)
output stream function
Definition: linear_master_slave_constraint.h:432
model_part
Definition: face_heat.py:14
int nnodes
Definition: sensitivityMatrix.py:24
integer i
Definition: TensorModule.f:17