OGS
ProcessLib::BoundaryConditionAndSourceTerm Namespace Reference

Namespaces

namespace  detail
 
namespace  Python
 

Classes

class  LocalAssemblerFactory
 

Typedefs

template<typename LocalAssemblerInterface , template< typename, typename, typename, int > class LocalAssemblerImplementation, int GlobalDim, typename... ConstructorArgs>
using LocalAssemblerFactoryPython = LocalAssemblerFactoryTaylorHood< 0, 0, LocalAssemblerInterface, LocalAssemblerImplementation, GlobalDim, ConstructorArgs... >
 

Functions

template<template< typename, typename, typename, int > class LocalAssemblerImplementation, typename LocalAssemblerInterface , typename... ExtraCtorArgs>
void createLocalAssemblersPython (const unsigned dimension, std::vector< MeshLib::Element * > const &mesh_elements, NumLib::LocalToGlobalIndexMap const &dof_table, std::vector< std::unique_ptr< LocalAssemblerInterface > > &local_assemblers, ExtraCtorArgs &&... extra_ctor_args)
 
template<template< typename, typename, int > class LocalAssemblerImplementation, typename LocalAssemblerInterface , typename... ExtraCtorArgs>
void createLocalAssemblers (const unsigned dimension, std::vector< MeshLib::Element * > const &mesh_elements, NumLib::LocalToGlobalIndexMap const &dof_table, const unsigned shapefunction_order, std::vector< std::unique_ptr< LocalAssemblerInterface > > &local_assemblers, ExtraCtorArgs &&... extra_ctor_args)
 

Typedef Documentation

◆ LocalAssemblerFactoryPython

template<typename LocalAssemblerInterface , template< typename, typename, typename, int > class LocalAssemblerImplementation, int GlobalDim, typename... ConstructorArgs>
using ProcessLib::BoundaryConditionAndSourceTerm::LocalAssemblerFactoryPython = typedef LocalAssemblerFactoryTaylorHood< 0 , 0 , LocalAssemblerInterface, LocalAssemblerImplementation, GlobalDim, ConstructorArgs...>

Definition at line 25 of file LocalAssemblerFactoryPython.h.

Function Documentation

◆ createLocalAssemblers()

template<template< typename, typename, int > class LocalAssemblerImplementation, typename LocalAssemblerInterface , typename... ExtraCtorArgs>
void ProcessLib::BoundaryConditionAndSourceTerm::createLocalAssemblers ( const unsigned  dimension,
std::vector< MeshLib::Element * > const &  mesh_elements,
NumLib::LocalToGlobalIndexMap const &  dof_table,
const unsigned  shapefunction_order,
std::vector< std::unique_ptr< LocalAssemblerInterface > > &  local_assemblers,
ExtraCtorArgs &&...  extra_ctor_args 
)

Creates local assemblers for each element of the given mesh.

Template Parameters
LocalAssemblerImplementationthe individual local assembler type
LocalAssemblerInterfacethe general local assembler interface
ExtraCtorArgstypes of additional constructor arguments. Those arguments will be passed to the constructor of LocalAssemblerImplementation.

The first two template parameters cannot be deduced from the arguments. Therefore they always have to be provided manually.

Definition at line 67 of file CreateLocalAssemblers.h.

74{
75 DBUG("Create local assemblers.");
76
77 switch (dimension)
78 {
79 case 1:
80 detail::createLocalAssemblers<1, LocalAssemblerImplementation>(
81 dof_table, shapefunction_order, mesh_elements, local_assemblers,
82 std::forward<ExtraCtorArgs>(extra_ctor_args)...);
83 break;
84 case 2:
85 detail::createLocalAssemblers<2, LocalAssemblerImplementation>(
86 dof_table, shapefunction_order, mesh_elements, local_assemblers,
87 std::forward<ExtraCtorArgs>(extra_ctor_args)...);
88 break;
89 case 3:
90 detail::createLocalAssemblers<3, LocalAssemblerImplementation>(
91 dof_table, shapefunction_order, mesh_elements, local_assemblers,
92 std::forward<ExtraCtorArgs>(extra_ctor_args)...);
93 break;
94 default:
96 "Meshes with dimension greater than three are not supported.");
97 }
98}
#define OGS_FATAL(...)
Definition: Error.h:26
void DBUG(char const *fmt, Args const &... args)
Definition: Logging.h:29

References DBUG(), and OGS_FATAL.

Referenced by ProcessLib::ConstraintDirichletBoundaryCondition::ConstraintDirichletBoundaryCondition(), ProcessLib::GenericNaturalBoundaryCondition< BoundaryConditionData, LocalAssemblerImplementation >::GenericNaturalBoundaryCondition(), and ProcessLib::VolumetricSourceTerm::VolumetricSourceTerm().

◆ createLocalAssemblersPython()

template<template< typename, typename, typename, int > class LocalAssemblerImplementation, typename LocalAssemblerInterface , typename... ExtraCtorArgs>
void ProcessLib::BoundaryConditionAndSourceTerm::createLocalAssemblersPython ( const unsigned  dimension,
std::vector< MeshLib::Element * > const &  mesh_elements,
NumLib::LocalToGlobalIndexMap const &  dof_table,
std::vector< std::unique_ptr< LocalAssemblerInterface > > &  local_assemblers,
ExtraCtorArgs &&...  extra_ctor_args 
)

Creates a local assembler for each of the given mesh_elements.

Template Parameters
LocalAssemblerImplementationthe individual local assembler type
LocalAssemblerInterfacethe general local assembler interface
ExtraCtorArgstypes of additional constructor arguments. Those arguments will be passed to the constructor of LocalAssemblerImplementation.

The first two template parameters cannot be deduced from the arguments. Therefore they always have to be provided manually.

Definition at line 70 of file CreateLocalAssemblers.h.

76{
77 DBUG("Create local assemblers.");
78
79 switch (dimension)
80 {
81 case 1:
83 LocalAssemblerImplementation>(
84 dof_table, mesh_elements, local_assemblers,
85 std::forward<ExtraCtorArgs>(extra_ctor_args)...);
86 break;
87 case 2:
89 LocalAssemblerImplementation>(
90 dof_table, mesh_elements, local_assemblers,
91 std::forward<ExtraCtorArgs>(extra_ctor_args)...);
92 break;
93 case 3:
95 LocalAssemblerImplementation>(
96 dof_table, mesh_elements, local_assemblers,
97 std::forward<ExtraCtorArgs>(extra_ctor_args)...);
98 break;
99 default:
100 OGS_FATAL(
101 "Meshes with dimension greater than three are not supported.");
102 }
103}
void createLocalAssemblersPython(const unsigned dimension, std::vector< MeshLib::Element * > const &mesh_elements, NumLib::LocalToGlobalIndexMap const &dof_table, std::vector< std::unique_ptr< LocalAssemblerInterface > > &local_assemblers, ExtraCtorArgs &&... extra_ctor_args)

References ProcessLib::BoundaryConditionAndSourceTerm::detail::createLocalAssemblersPython(), DBUG(), and OGS_FATAL.

Referenced by ProcessLib::PythonBoundaryCondition::PythonBoundaryCondition(), and ProcessLib::SourceTerms::Python::PythonSourceTerm::PythonSourceTerm().