OGS
ProcessLib::BoundaryConditionAndSourceTerm Namespace Reference

Namespaces

namespace  detail
 
namespace  Python
 

Classes

class  LocalAssemblerFactory
 

Typedefs

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

Functions

template<template< 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, NumLib::IntegrationOrder const integration_order, ExtraCtorArgs &&... extra_ctor_args)
 
template<template< 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, NumLib::IntegrationOrder const integration_order, ExtraCtorArgs &&... extra_ctor_args)
 

Typedef Documentation

◆ LocalAssemblerFactoryPython

template<typename LocalAssemblerInterface , template< typename, typename, int > class LocalAssemblerImplementation, int GlobalDim, typename... ConstructorArgs>
using ProcessLib::BoundaryConditionAndSourceTerm::LocalAssemblerFactoryPython
Initial value:
LocalAssemblerFactoryTaylorHood<
0 , 0 ,
LocalAssemblerInterface, LocalAssemblerImplementation,
NumLib::DefaultIntegrationMethodProvider, GlobalDim, ConstructorArgs...>

Definition at line 24 of file LocalAssemblerFactoryPython.h.

Function Documentation

◆ createLocalAssemblers()

template<template< 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,
NumLib::IntegrationOrder const integration_order,
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 69 of file CreateLocalAssemblers.h.

77{
78 DBUG("Create local assemblers.");
79
80 switch (dimension)
81 {
82 case 0:
83 detail::createLocalAssemblers<0, LocalAssemblerImplementation>(
84 dof_table, shapefunction_order, mesh_elements, local_assemblers,
85 integration_order,
86 std::forward<ExtraCtorArgs>(extra_ctor_args)...);
87 break;
88 case 1:
89 detail::createLocalAssemblers<1, LocalAssemblerImplementation>(
90 dof_table, shapefunction_order, mesh_elements, local_assemblers,
91 integration_order,
92 std::forward<ExtraCtorArgs>(extra_ctor_args)...);
93 break;
94 case 2:
95 detail::createLocalAssemblers<2, LocalAssemblerImplementation>(
96 dof_table, shapefunction_order, mesh_elements, local_assemblers,
97 integration_order,
98 std::forward<ExtraCtorArgs>(extra_ctor_args)...);
99 break;
100 case 3:
101 detail::createLocalAssemblers<3, LocalAssemblerImplementation>(
102 dof_table, shapefunction_order, mesh_elements, local_assemblers,
103 integration_order,
104 std::forward<ExtraCtorArgs>(extra_ctor_args)...);
105 break;
106 default:
107 OGS_FATAL(
108 "Meshes with dimension greater than three are not supported.");
109 }
110}
#define OGS_FATAL(...)
Definition Error.h:26
void DBUG(fmt::format_string< Args... > fmt, Args &&... args)
Definition Logging.h:30

References DBUG(), and OGS_FATAL.

Referenced by ProcessLib::VolumetricSourceTerm::VolumetricSourceTerm().

◆ createLocalAssemblersPython()

template<template< 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,
NumLib::IntegrationOrder const integration_order,
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 69 of file CreateLocalAssemblers.h.

76{
77 DBUG("Create local assemblers.");
78
79 switch (dimension)
80 {
81 case 0:
82 detail::createLocalAssemblersPython<0,
83 LocalAssemblerImplementation>(
84 dof_table, mesh_elements, local_assemblers, integration_order,
85 std::forward<ExtraCtorArgs>(extra_ctor_args)...);
86 break;
87 case 1:
88 detail::createLocalAssemblersPython<1,
89 LocalAssemblerImplementation>(
90 dof_table, mesh_elements, local_assemblers, integration_order,
91 std::forward<ExtraCtorArgs>(extra_ctor_args)...);
92 break;
93 case 2:
94 detail::createLocalAssemblersPython<2,
95 LocalAssemblerImplementation>(
96 dof_table, mesh_elements, local_assemblers, integration_order,
97 std::forward<ExtraCtorArgs>(extra_ctor_args)...);
98 break;
99 case 3:
100 detail::createLocalAssemblersPython<3,
101 LocalAssemblerImplementation>(
102 dof_table, mesh_elements, local_assemblers, integration_order,
103 std::forward<ExtraCtorArgs>(extra_ctor_args)...);
104 break;
105 default:
106 OGS_FATAL(
107 "Meshes with dimension greater than three are not supported.");
108 }
109}

References DBUG(), and OGS_FATAL.

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