OGS
|
A boundary condition whose values are computed by a Python script.
Definition at line 43 of file PythonBoundaryCondition.h.
#include <PythonBoundaryCondition.h>
Public Member Functions | |
PythonBoundaryCondition (PythonBoundaryConditionData &&bc_data, unsigned const integration_order, unsigned const shapefunction_order, unsigned const global_dim, bool const flush_stdout) | |
void | getEssentialBCValues (const double t, const GlobalVector &x, NumLib::IndexValueVector< GlobalIndexType > &bc_values) const override |
Writes the values of essential BCs to bc_values . More... | |
void | applyNaturalBC (const double t, std::vector< GlobalVector * > const &x, int const process_id, GlobalMatrix &K, GlobalVector &b, GlobalMatrix *Jac) override |
Public Member Functions inherited from ProcessLib::BoundaryCondition | |
virtual void | preTimestep (const double, std::vector< GlobalVector * > const &, int const) |
virtual void | postTimestep (const double, std::vector< GlobalVector * > const &, int const) |
virtual | ~BoundaryCondition ()=default |
Private Attributes | |
PythonBoundaryConditionData | _bc_data |
Auxiliary data. More... | |
std::unique_ptr< NumLib::LocalToGlobalIndexMap > | _dof_table_boundary |
Local dof table for the boundary mesh. More... | |
std::vector< std::unique_ptr< GenericNaturalBoundaryConditionLocalAssemblerInterface > > | _local_assemblers |
Local assemblers for all elements of the boundary mesh. More... | |
bool const | _flush_stdout |
ProcessLib::PythonBoundaryCondition::PythonBoundaryCondition | ( | PythonBoundaryConditionData && | bc_data, |
unsigned const | integration_order, | ||
unsigned const | shapefunction_order, | ||
unsigned const | global_dim, | ||
bool const | flush_stdout | ||
) |
Definition at line 25 of file PythonBoundaryCondition.cpp.
References _bc_data, _dof_table_boundary, _local_assemblers, ProcessLib::PythonBoundaryConditionData::boundary_mesh, ProcessLib::BoundaryConditionAndSourceTerm::createLocalAssemblers(), NumLib::LocalToGlobalIndexMap::deriveBoundaryConstrainedMap(), ProcessLib::PythonBoundaryConditionData::dof_table_bulk, MeshLib::Mesh::getElements(), MeshLib::Mesh::getNodes(), and MeshLib::Mesh::isAxiallySymmetric().
|
overridevirtual |
Applies natural BCs (i.e. non-Dirichlet BCs) to the stiffness matrix K
and the vector b
.
Reimplemented from ProcessLib::BoundaryCondition.
Definition at line 149 of file PythonBoundaryCondition.cpp.
References _dof_table_boundary, _flush_stdout, _local_assemblers, ProcessLib::GenericNaturalBoundaryConditionLocalAssemblerInterface::assemble(), DBUG(), and NumLib::SerialExecutor::executeMemberOnDereferenced().
|
overridevirtual |
Writes the values of essential BCs to bc_values
.
Reimplemented from ProcessLib::BoundaryCondition.
Definition at line 50 of file PythonBoundaryCondition.cpp.
References _bc_data, _dof_table_boundary, _flush_stdout, ProcessLib::PythonBoundaryConditionData::bc_object, ProcessLib::PythonBoundaryConditionData::boundary_mesh, ProcessLib::PythonBoundaryConditionData::bulk_mesh_id, DBUG(), ProcessLib::PythonBoundaryConditionData::dof_table_bulk, ProcessLib::PythonBoundaryConditionPythonSideInterface::getDirichletBCValue(), NumLib::LocalToGlobalIndexMap::getGlobalIndex(), MeshLib::Mesh::getNodes(), MeshLib::Mesh::getNumberOfNodes(), MeshLib::Mesh::getProperties(), MeshLib::Properties::getPropertyVector(), ProcessLib::PythonBoundaryConditionData::global_component_id, NumLib::IndexValueVector< IndexType >::ids, ProcessLib::PythonBoundaryConditionPythonSideInterface::isOverriddenEssential(), MeshLib::Node, NumLib::MeshComponentMap::nop, OGS_FATAL, and NumLib::IndexValueVector< IndexType >::values.
|
private |
Auxiliary data.
Definition at line 62 of file PythonBoundaryCondition.h.
Referenced by PythonBoundaryCondition(), and getEssentialBCValues().
|
private |
Local dof table for the boundary mesh.
Definition at line 65 of file PythonBoundaryCondition.h.
Referenced by PythonBoundaryCondition(), applyNaturalBC(), and getEssentialBCValues().
|
private |
Whether or not to flush standard output before and after each call to Python code. Ensures right order of output messages and therefore simplifies debugging.
Definition at line 75 of file PythonBoundaryCondition.h.
Referenced by applyNaturalBC(), and getEssentialBCValues().
|
private |
Local assemblers for all elements of the boundary mesh.
Definition at line 70 of file PythonBoundaryCondition.h.
Referenced by PythonBoundaryCondition(), and applyNaturalBC().