9 #if !defined(KRATOS_TRILINOS_SPALART_ALLMARAS_H_INCLUDED )
10 #define KRATOS_TRILINOS_SPALART_ALLMARAS_H_INCLUDED
15 #include "Epetra_MpiComm.h"
56 template<
class TSparseSpace,
78 typename TLinearSolver::Pointer pLinearSolver,
79 unsigned int DomainSize,
83 unsigned int TimeOrder)
102 KRATOS_THROW_ERROR(std::logic_error,
"Variable is not in the model part:", MOLECULAR_VISCOSITY);
104 KRATOS_THROW_ERROR(std::logic_error,
"Variable is not in the model part:", TURBULENT_VISCOSITY);
106 KRATOS_THROW_ERROR(std::logic_error,
"Variable is not in the model part:", MESH_VELOCITY);
108 KRATOS_THROW_ERROR(std::logic_error,
"Variable is not in the model part:", VISCOSITY);
110 KRATOS_THROW_ERROR(std::logic_error,
"Variable is not in the model part:", NODAL_AREA);
112 KRATOS_THROW_ERROR(std::logic_error,
"Variable is not in the model part:", TEMP_CONV_PROJ);
114 KRATOS_THROW_ERROR(std::logic_error,
"Variable is not in the model part:", PARTITION_INDEX);
133 pSpalartMPIComm->LocalMesh().SetNodes( rReferenceComm.
LocalMesh().
pNodes() );
135 pSpalartMPIComm->GhostMesh().SetNodes( rReferenceComm.
GhostMesh().
pNodes() );
138 pSpalartMPIComm->pInterfaceMesh(
i)->SetNodes( rReferenceComm.
pInterfaceMesh(
i)->pNodes() );
139 pSpalartMPIComm->pLocalMesh(
i)->SetNodes( rReferenceComm.
pLocalMesh(
i)->pNodes() );
140 pSpalartMPIComm->pGhostMesh(
i)->SetNodes( rReferenceComm.
pGhostMesh(
i)->pNodes() );
144 std::string ElementName;
146 ElementName = std::string(
"SpalartAllmaras2D");
148 ElementName = std::string(
"SpalartAllmaras3D");
155 Properties::Pointer properties = iii->pGetProperties();
156 Element::Pointer p_element = rReferenceElement.
Create(iii->Id(), iii->GetGeometry(), properties);
160 std::string ConditionName;
162 ConditionName = std::string(
"LineCondition2D2N");
164 ConditionName = std::string(
"SurfaceCondition3D3N");
169 Properties::Pointer properties = iii->pGetProperties();
170 Condition::Pointer p_condition = rReferenceCondition.
Create(iii->Id(), iii->GetGeometry(), properties);
176 CommunicatorGeneration.
Execute();
186 const double DefaultAitkenOmega = 1.0;
190 const double NearlyZero = 1.0e-20;
196 else guess_row_size = 40;
202 bool CalculateReactions =
false;
241 std::string
Info()
const override
243 std::stringstream buffer;
244 buffer <<
"TrilinosSpalartAllmarasTurbulenceModel";
251 rOStream <<
"TrilinosSpalartAllmarasTurbulenceModel";
288 typename TLinearSolver::Pointer pNewLinearSolver,
347 BaseSpAlType::operator=(rOther);
374 template<
class TSparseSpace,
385 template<
class TSparseSpace,
393 rOStream << std::endl;
Current class provides an implementation for the base builder and solving operations.
Definition: builder_and_solver.h:64
The Commmunicator class manages communication for distributed ModelPart instances.
Definition: communicator.h:67
NeighbourIndicesContainerType & NeighbourIndices()
Definition: communicator.cpp:162
MeshType & GhostMesh()
Returns the reference to the mesh storing all ghost entities.
Definition: communicator.cpp:251
MeshType::Pointer pInterfaceMesh()
Returns pointer to the mesh storing all interface entities.
Definition: communicator.cpp:191
SizeType GetNumberOfColors() const
Definition: communicator.cpp:121
MeshType::Pointer pLocalMesh()
Returns pointer to the mesh storing all local entities.
Definition: communicator.cpp:179
virtual const DataCommunicator & GetDataCommunicator() const
Definition: communicator.cpp:340
MeshType & InterfaceMesh()
Returns the reference to the mesh storing all interface entities.
Definition: communicator.cpp:257
MeshType & LocalMesh()
Returns the reference to the mesh storing all local entities.
Definition: communicator.cpp:245
MeshType::Pointer pGhostMesh()
Returns pointer to the mesh storing all ghost entities.
Definition: communicator.cpp:185
Base class for all Conditions.
Definition: condition.h:59
virtual Pointer Create(IndexType NewId, NodesArrayType const &ThisNodes, PropertiesType::Pointer pProperties) const
It creates a new condition pointer.
Definition: condition.h:205
This is the base class to define the different convergence criterion considered.
Definition: convergence_criteria.h:58
Base class for all Elements.
Definition: element.h:60
virtual Pointer Create(IndexType NewId, NodesArrayType const &ThisNodes, PropertiesType::Pointer pProperties) const
It creates a new element pointer.
Definition: element.h:202
Implicit solving strategy base class This is the base class from which we will derive all the implici...
Definition: implicit_solving_strategy.h:61
static const TComponentType & Get(const std::string &rName)
Retrieves a component with the specified name.
Definition: kratos_components.h:114
MPICommunicator manages the transfer of ModelPart data in MPI distributed memory environment.
Definition: mpi_communicator.h:569
NodesContainerType::Pointer pNodes()
Definition: mesh.h:356
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
void SetCommunicator(Communicator::Pointer pNewCommunicator)
Definition: model_part.h:1836
void SetNodes(NodesContainerType::Pointer pOtherNodes, IndexType ThisIndex=0)
Definition: model_part.h:522
void SetProcessInfo(ProcessInfo::Pointer pNewProcessInfo)
Definition: model_part.h:1766
void SetProperties(PropertiesContainerType::Pointer pOtherProperties, IndexType ThisIndex=0)
Definition: model_part.h:1013
Communicator & GetCommunicator()
Definition: model_part.h:1821
void SetBufferSize(IndexType NewBufferSize)
This method sets the suffer size of the model part database.
Definition: model_part.cpp:2171
ConditionsContainerType & Conditions(IndexType ThisIndex=0)
Definition: model_part.h:1381
ElementsContainerType & Elements(IndexType ThisIndex=0)
Definition: model_part.h:1189
ElementIterator ElementsEnd(IndexType ThisIndex=0)
Definition: model_part.h:1179
VariablesList & GetNodalSolutionStepVariablesList()
Definition: model_part.h:549
ConditionIterator ConditionsEnd(IndexType ThisIndex=0)
Definition: model_part.h:1371
This function recomputes the communication plan for MPI.
Definition: parallel_fill_communicator.h:56
void Execute() override
Execute the communicator fill.
Definition: parallel_fill_communicator.cpp:39
This is the base Newton Raphson strategy.
Definition: residualbased_newton_raphson_strategy.h:66
This is a convergence criteria that considers the residual as criteria.
Definition: residual_criteria.h:60
This class provides the implementation of the basic tasks that are needed by the solution strategy.
Definition: scheme.h:56
An impelementation of the Spalart-Allmaras turbulence model for incompressible flows.
Definition: spalart_allmaras_turbulence_model.h:77
unsigned int mdomain_size
Definition: spalart_allmaras_turbulence_model.h:366
double mtol
Definition: spalart_allmaras_turbulence_model.h:367
unsigned int mmax_it
Definition: spalart_allmaras_turbulence_model.h:368
bool madapt_for_fractional_step
Definition: spalart_allmaras_turbulence_model.h:370
ModelPart & mrSpalartModelPart
Definition: spalart_allmaras_turbulence_model.h:365
unsigned int mtime_order
Definition: spalart_allmaras_turbulence_model.h:369
ImplicitSolvingStrategy< TSparseSpace, TDenseSpace, TLinearSolver >::Pointer mpSolutionStrategy
Definition: spalart_allmaras_turbulence_model.h:371
ModelPart & mr_model_part
Definition: spalart_allmaras_turbulence_model.h:364
Definition: trilinos_elimination_builder_and_solver.h:117
A scheme for the solution of a problem using Aitken iterations.
Definition: trilinos_residualbased_incremental_aitken_static_scheme.h:54
Trilinos implementation of the Spalart-Allmaras turbulence model.
Definition: trilinos_spalart_allmaras_turbulence_model.h:61
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: trilinos_spalart_allmaras_turbulence_model.h:255
virtual ~TrilinosSpalartAllmarasTurbulenceModel()
Destructor.
Definition: trilinos_spalart_allmaras_turbulence_model.h:213
SpalartAllmarasTurbulenceModel< TSparseSpace, TDenseSpace, TLinearSolver > BaseSpAlType
Definition: trilinos_spalart_allmaras_turbulence_model.h:69
std::string Info() const override
Turn back information as a string.
Definition: trilinos_spalart_allmaras_turbulence_model.h:241
KRATOS_CLASS_POINTER_DEFINITION(TrilinosSpalartAllmarasTurbulenceModel)
Pointer definition of TrilinosSpalartAllmarasTurbulenceModel.
virtual void SolutionStrategyConfiguration(ModelPart &rSpalartModelPart, typename TLinearSolver::Pointer pNewLinearSolver, bool reform_dofset)
Initialize a Trilinos Solution Strategy for the Spalart Allmaras turbulence model.
Definition: trilinos_spalart_allmaras_turbulence_model.h:287
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: trilinos_spalart_allmaras_turbulence_model.h:249
TrilinosSpalartAllmarasTurbulenceModel(Epetra_MpiComm &rComm, ModelPart &rModelPart, typename TLinearSolver::Pointer pLinearSolver, unsigned int DomainSize, double NonLinearTol, unsigned int MaxIter, bool ReformDofSet, unsigned int TimeOrder)
Constructor.
Definition: trilinos_spalart_allmaras_turbulence_model.h:76
#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
void MoveMesh(Scheme< SparseSpaceType, LocalSpaceType > &dummy, ModelPart::NodesContainerType &rNodes)
Definition: add_strategies_to_python.cpp:175
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
integer i
Definition: TensorModule.f:17