13 #if !defined(KRATOS_ADJOINT_MONOLITHIC_WALL_CONDITION_H_INCLUDED)
14 #define KRATOS_ADJOINT_MONOLITHIC_WALL_CONDITION_H_INCLUDED
39 template <
unsigned int TDim,
unsigned int TNumNodes = TDim>
47 explicit ThisExtensions(
Condition* pCondition)
48 : mpCondition{pCondition}
52 void GetFirstDerivativesVector(
55 std::size_t Step)
override;
57 void GetSecondDerivativesVector(
60 std::size_t Step)
override;
62 void GetAuxiliaryVector(
65 std::size_t Step)
override;
67 void GetFirstDerivativesVariables(
68 std::vector<VariableData const*>& rVariables)
const override;
70 void GetSecondDerivativesVariables(
71 std::vector<VariableData const*>& rVariables)
const override;
73 void GetAuxiliaryVariables(
74 std::vector<VariableData const*>& rVariables)
const override;
107 static constexpr
IndexType TFluidLocalSize = TBlockSize * TNumNodes;
109 static constexpr
IndexType TCoordsLocalSize = TDim * TNumNodes;
129 GeometryType::Pointer pGeometry)
136 GeometryType::Pointer pGeometry,
137 PropertiesType::Pointer pProperties)
138 :
Condition(NewId, pGeometry, pProperties)
167 PropertiesType::Pointer pProperties)
const override
169 return Kratos::make_intrusive<AdjointMonolithicWallCondition>(
170 NewId, GetGeometry().
Create(ThisNodes), pProperties);
175 GeometryType::Pointer pGeom,
176 PropertiesType::Pointer pProperties)
const override
178 return Kratos::make_intrusive<AdjointMonolithicWallCondition>(NewId, pGeom, pProperties);
185 Condition::Pointer pNewCondition =
186 Create(NewId, GetGeometry().
Create(rThisNodes), pGetProperties());
188 pNewCondition->SetData(this->GetData());
189 pNewCondition->SetFlags(this->GetFlags());
191 return pNewCondition;
196 this->
SetValue(ADJOINT_EXTENSIONS, Kratos::make_shared<ThisExtensions>(
this));
199 int Check(
const ProcessInfo& rCurrentProcessInfo)
const override;
203 const ProcessInfo& rCurrentProcessInfo)
const override;
207 const ProcessInfo& CurrentProcessInfo)
const override;
211 int Step = 0)
const override;
213 void GetFirstDerivativesVector(
215 int Step = 0)
const override;
219 int Step = 0)
const override;
232 void CalculateLocalSystem(
248 void CalculateLocalVelocityContribution(
259 void CalculateLeftHandSide(
260 Matrix& rLeftHandSideMatrix,
269 void CalculateFirstDerivativesLHS(
270 Matrix& rLeftHandSideMatrix,
279 void CalculateSecondDerivativesLHS(
280 Matrix& rLeftHandSideMatrix,
290 void CalculateSensitivityMatrix(
300 std::string
Info()
const override
302 std::stringstream buffer;
303 buffer <<
"AdjointMonolithicWallCondition" << TDim <<
"D";
310 rOStream <<
"AdjointMonolithicWallCondition";
324 virtual void ApplyNeumannCondition(
329 virtual void ApplyWallLaw(
334 virtual void ApplyNeumannConditionShapeDerivatives(
338 virtual void ApplyWallLawStateDerivatives(
342 virtual void ApplyWallLawShapeDerivatives(
351 void CalculateDataShapeDerivatives(
365 double CalculateDetJ(
const double Area)
const;
367 void CalculateDetJShapeDerivatives(
373 void save(
Serializer& rSerializer)
const override
392 template <
unsigned int TDim,
unsigned int TNumNodes>
394 std::istream& rIStream,
401 template <
unsigned int TDim,
unsigned int TNumNodes>
403 std::ostream& rOStream,
407 rOStream << std::endl;
Interface extensions for adjoint elements and conditions.
Definition: adjoint_extensions.h:37
Definition: adjoint_monolithic_wall_condition.h:41
AdjointMonolithicWallCondition(IndexType NewId=0)
Definition: adjoint_monolithic_wall_condition.h:115
AdjointMonolithicWallCondition & operator=(AdjointMonolithicWallCondition const &rOther)
Assignment operator.
Definition: adjoint_monolithic_wall_condition.h:154
Condition::Pointer Create(IndexType NewId, NodesArrayType const &ThisNodes, PropertiesType::Pointer pProperties) const override
It creates a new condition pointer.
Definition: adjoint_monolithic_wall_condition.h:164
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: adjoint_monolithic_wall_condition.h:314
AdjointMonolithicWallCondition(IndexType NewId, const NodesArrayType &ThisNodes)
Definition: adjoint_monolithic_wall_condition.h:120
void GetSecondDerivativesVector(Vector &Values, int Step=0) const override
std::string Info() const override
Turn back information as a string.
Definition: adjoint_monolithic_wall_condition.h:300
Condition::Pointer Create(IndexType NewId, GeometryType::Pointer pGeom, PropertiesType::Pointer pProperties) const override
It creates a new condition pointer.
Definition: adjoint_monolithic_wall_condition.h:173
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: adjoint_monolithic_wall_condition.h:308
void GetValuesVector(Vector &Values, int Step=0) const override
Condition::Pointer Clone(IndexType NewId, NodesArrayType const &rThisNodes) const override
It creates a new condition pointer and clones the previous condition data.
Definition: adjoint_monolithic_wall_condition.h:181
AdjointMonolithicWallCondition(AdjointMonolithicWallCondition const &rOther)
Definition: adjoint_monolithic_wall_condition.h:142
std::size_t IndexType
Definition: adjoint_monolithic_wall_condition.h:95
AdjointMonolithicWallCondition(IndexType NewId, GeometryType::Pointer pGeometry)
Definition: adjoint_monolithic_wall_condition.h:127
void Initialize(const ProcessInfo &rCurrentProcessInfo) override
Definition: adjoint_monolithic_wall_condition.h:194
AdjointMonolithicWallCondition(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties)
Definition: adjoint_monolithic_wall_condition.h:134
~AdjointMonolithicWallCondition() override=default
void GetDofList(DofsVectorType &ConditionDofList, const ProcessInfo &CurrentProcessInfo) const override
void EquationIdVector(EquationIdVectorType &rResult, const ProcessInfo &rCurrentProcessInfo) const override
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(AdjointMonolithicWallCondition)
Base class for all Conditions.
Definition: condition.h:59
std::size_t SizeType
Definition: condition.h:94
std::vector< std::size_t > EquationIdVectorType
Definition: condition.h:98
std::vector< DofType::Pointer > DofsVectorType
Definition: condition.h:100
Condition & operator=(Condition const &rOther)
Assignment operator.
Definition: condition.h:181
Geometry base class.
Definition: geometry.h:71
This object defines an indexed object.
Definition: indexed_object.h:54
Wrapper for a function which behaves like an arithmetic type.
Definition: indirect_scalar.h:45
This class defines the node.
Definition: node.h:65
PointerVector is a container like stl vector but using a vector to store pointers to its data.
Definition: pointer_vector.h:72
A sorted associative container similar to an STL set, but uses a vector to store pointers to its data...
Definition: pointer_vector_set.h:72
ProcessInfo holds the current value of different solution parameters.
Definition: process_info.h:59
Properties encapsulates data shared by different Elements or Conditions. It can store any type of dat...
Definition: properties.h:69
The serialization consists in storing the state of an object into a storage format like data file or ...
Definition: serializer.h:123
Variable class contains all information needed to store and retrive data from a data container.
Definition: variable.h:63
#define KRATOS_SERIALIZE_SAVE_BASE_CLASS(Serializer, BaseType)
Definition: define.h:812
#define KRATOS_SERIALIZE_LOAD_BASE_CLASS(Serializer, BaseType)
Definition: define.h:815
Modeler::Pointer Create(const std::string &ModelerName, Model &rModel, const Parameters ModelParameters)
Checks if the modeler is registered.
Definition: modeler_factory.cpp:30
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
Internals::Matrix< double, AMatrix::dynamic, 1 > Vector
Definition: amatrix_interface.h:472
Internals::Matrix< double, AMatrix::dynamic, AMatrix::dynamic > Matrix
Definition: amatrix_interface.h:470
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
def SetValue(entity, variable, value)
Definition: coupling_interface_data.py:256
def load(f)
Definition: ode_solve.py:307