OGS
ProcessLib::LocalAssemblerInterface Class Reference

Detailed Description

Common interface for local assemblers NumLib::ODESystemTag::FirstOrderImplicitQuasilinear ODE systems.

Todo
Generalize to other NumLib::ODESystemTag's.

Definition at line 30 of file LocalAssemblerInterface.h.

#include <LocalAssemblerInterface.h>

Inheritance diagram for ProcessLib::LocalAssemblerInterface:
[legend]

Public Member Functions

virtual ~LocalAssemblerInterface ()=default
 
virtual void setInitialConditions (std::size_t const mesh_item_id, std::vector< NumLib::LocalToGlobalIndexMap const * > const &dof_tables, std::vector< GlobalVector * > const &x, double const t, int const process_id)
 
virtual void initialize (std::size_t const mesh_item_id, NumLib::LocalToGlobalIndexMap const &dof_table)
 
virtual void preAssemble (double const, double const, std::vector< double > const &)
 
virtual void assemble (double const t, double const dt, std::vector< double > const &local_x, std::vector< double > const &local_x_prev, std::vector< double > &local_M_data, std::vector< double > &local_K_data, std::vector< double > &local_b_data)
 
virtual void assembleForStaggeredScheme (double const t, double const dt, Eigen::VectorXd const &local_x, Eigen::VectorXd const &local_x_prev, int const process_id, std::vector< double > &local_M_data, std::vector< double > &local_K_data, std::vector< double > &local_b_data)
 
virtual void assembleWithJacobian (double const t, double const dt, std::vector< double > const &local_x, std::vector< double > const &local_x_prev, std::vector< double > &local_b_data, std::vector< double > &local_Jac_data)
 
virtual void assembleWithJacobianForStaggeredScheme (double const t, double const dt, Eigen::VectorXd const &local_x, Eigen::VectorXd const &local_x_prev, int const process_id, std::vector< double > &local_b_data, std::vector< double > &local_Jac_data)
 
virtual void computeSecondaryVariable (std::size_t const mesh_item_id, std::vector< NumLib::LocalToGlobalIndexMap const * > const &dof_tables, double const t, double const dt, std::vector< GlobalVector * > const &x, GlobalVector const &x_prev, int const process_id)
 
virtual void preTimestep (std::size_t const mesh_item_id, NumLib::LocalToGlobalIndexMap const &dof_table, GlobalVector const &x, double const t, double const delta_t)
 
virtual void postTimestep (std::size_t const mesh_item_id, std::vector< NumLib::LocalToGlobalIndexMap const * > const &dof_tables, std::vector< GlobalVector * > const &x, std::vector< GlobalVector * > const &x_prev, double const t, double const dt, int const process_id)
 
void postNonLinearSolver (std::size_t const mesh_item_id, std::vector< NumLib::LocalToGlobalIndexMap const * > const &dof_tables, std::vector< GlobalVector * > const &x, std::vector< GlobalVector * > const &x_prev, double const t, double const dt, int const process_id)
 
virtual Eigen::Vector3d getFlux (MathLib::Point3d const &, double const, std::vector< double > const &) const
 
virtual Eigen::Vector3d getFlux (MathLib::Point3d const &, double const, std::vector< std::vector< double > > const &) const
 Fits to staggered scheme.
 

Private Member Functions

virtual void setInitialConditionsConcrete (Eigen::VectorXd const, double const, int const)
 
virtual void initializeConcrete ()
 
virtual void preTimestepConcrete (std::vector< double > const &, double const, double const)
 
virtual void postTimestepConcrete (Eigen::VectorXd const &, Eigen::VectorXd const &, double const, double const, int const)
 
virtual void postNonLinearSolverConcrete (Eigen::VectorXd const &, Eigen::VectorXd const &, double const, double const, int const)
 
virtual void computeSecondaryVariableConcrete (double const, double const, Eigen::VectorXd const &, Eigen::VectorXd const &)
 

Constructor & Destructor Documentation

◆ ~LocalAssemblerInterface()

virtual ProcessLib::LocalAssemblerInterface::~LocalAssemblerInterface ( )
virtualdefault

Member Function Documentation

◆ assemble()

void ProcessLib::LocalAssemblerInterface::assemble ( double const t,
double const dt,
std::vector< double > const & local_x,
std::vector< double > const & local_x_prev,
std::vector< double > & local_M_data,
std::vector< double > & local_K_data,
std::vector< double > & local_b_data )
virtual

Reimplemented in ProcessLib::SteadyStateDiffusion::LocalAssemblerData< ShapeFunction, GlobalDim >, ProcessLib::StokesFlow::LocalAssemblerData< ShapeFunctionLiquidVelocity, ShapeFunctionPressure, GlobalDim >, ProcessLib::HeatConduction::LocalAssemblerData< ShapeFunction, GlobalDim >, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >, ProcessLib::HT::MonolithicHTFEM< ShapeFunction, GlobalDim >, ProcessLib::LiquidFlow::LiquidFlowLocalAssembler< ShapeFunction, GlobalDim >, ProcessLib::RichardsFlow::LocalAssemblerData< ShapeFunction, GlobalDim >, ProcessLib::RichardsComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >, ProcessLib::TES::TESLocalAssembler< ShapeFunction_, GlobalDim >, ProcessLib::ThermalTwoPhaseFlowWithPP::ThermalTwoPhaseFlowWithPPLocalAssembler< ShapeFunction, GlobalDim >, ProcessLib::TwoPhaseFlowWithPP::TwoPhaseFlowWithPPLocalAssembler< ShapeFunction, GlobalDim >, ProcessLib::WellboreSimulator::WellboreSimulatorFEM< ShapeFunction, GlobalDim >, ProcessLib::RichardsMechanics::RichardsMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >, ProcessLib::ThermoRichardsFlow::ThermoRichardsFlowLocalAssembler< ShapeFunction, GlobalDim >, ProcessLib::TwoPhaseFlowWithPrho::TwoPhaseFlowWithPrhoLocalAssembler< ShapeFunction, GlobalDim >, ProcessLib::HeatTransportBHE::HeatTransportBHELocalAssemblerBHE< ShapeFunction, BHEType >, ProcessLib::HeatTransportBHE::HeatTransportBHELocalAssemblerSoil< ShapeFunction >, ProcessLib::HydroMechanics::HydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >, ProcessLib::LargeDeformation::LargeDeformationLocalAssembler< ShapeFunction, DisplacementDim >, ProcessLib::LIE::HydroMechanics::HydroMechanicsLocalAssemblerInterface, ProcessLib::LIE::SmallDeformation::SmallDeformationLocalAssemblerFracture< ShapeFunction, DisplacementDim >, ProcessLib::LIE::SmallDeformation::SmallDeformationLocalAssemblerMatrix< ShapeFunction, DisplacementDim >, ProcessLib::LIE::SmallDeformation::SmallDeformationLocalAssemblerMatrixNearFracture< ShapeFunction, DisplacementDim >, ProcessLib::PhaseField::PhaseFieldLocalAssembler< ShapeFunction, DisplacementDim >, ProcessLib::SmallDeformation::SmallDeformationLocalAssembler< ShapeFunction, DisplacementDim >, ProcessLib::SmallDeformationNonlocal::SmallDeformationNonlocalLocalAssembler< ShapeFunction, DisplacementDim >, ProcessLib::TH2M::TH2MLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >, ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >, ProcessLib::ThermoMechanicalPhaseField::ThermoMechanicalPhaseFieldLocalAssembler< ShapeFunction, DisplacementDim >, and ProcessLib::ThermoMechanics::ThermoMechanicsLocalAssembler< ShapeFunction, DisplacementDim >.

Definition at line 20 of file LocalAssemblerInterface.cpp.

28{
30 "The assemble() function is not implemented in the local assembler.");
31}
#define OGS_FATAL(...)
Definition Error.h:26

References OGS_FATAL.

Referenced by ProcessLib::VectorMatrixAssembler::assemble(), ProcessLib::CentralDifferencesJacobianAssembler::assembleWithJacobian(), and ProcessLib::ForwardDifferencesJacobianAssembler::assembleWithJacobian().

◆ assembleForStaggeredScheme()

void ProcessLib::LocalAssemblerInterface::assembleForStaggeredScheme ( double const t,
double const dt,
Eigen::VectorXd const & local_x,
Eigen::VectorXd const & local_x_prev,
int const process_id,
std::vector< double > & local_M_data,
std::vector< double > & local_K_data,
std::vector< double > & local_b_data )
virtual

Reimplemented in ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >, and ProcessLib::HT::StaggeredHTFEM< ShapeFunction, GlobalDim >.

Definition at line 33 of file LocalAssemblerInterface.cpp.

39{
41 "The assembleForStaggeredScheme() function is not implemented in the "
42 "local assembler.");
43}

References OGS_FATAL.

Referenced by ProcessLib::VectorMatrixAssembler::assemble().

◆ assembleWithJacobian()

void ProcessLib::LocalAssemblerInterface::assembleWithJacobian ( double const t,
double const dt,
std::vector< double > const & local_x,
std::vector< double > const & local_x_prev,
std::vector< double > & local_b_data,
std::vector< double > & local_Jac_data )
virtual

Reimplemented in ProcessLib::LIE::SmallDeformation::SmallDeformationLocalAssemblerMatrix< ShapeFunction, DisplacementDim >, ProcessLib::LargeDeformation::LargeDeformationLocalAssembler< ShapeFunction, DisplacementDim >, ProcessLib::SmallDeformation::SmallDeformationLocalAssembler< ShapeFunction, DisplacementDim >, ProcessLib::HeatConduction::LocalAssemblerData< ShapeFunction, GlobalDim >, ProcessLib::HeatTransportBHE::HeatTransportBHELocalAssemblerBHE< ShapeFunction, BHEType >, ProcessLib::HeatTransportBHE::HeatTransportBHELocalAssemblerSoil< ShapeFunction >, ProcessLib::HydroMechanics::HydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >, ProcessLib::RichardsMechanics::RichardsMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >, ProcessLib::TH2M::TH2MLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >, ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >, ProcessLib::ThermoMechanics::ThermoMechanicsLocalAssembler< ShapeFunction, DisplacementDim >, ProcessLib::ThermoRichardsFlow::ThermoRichardsFlowLocalAssembler< ShapeFunction, GlobalDim >, ProcessLib::ThermoRichardsMechanics::ThermoRichardsMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunction, DisplacementDim, ConstitutiveTraits >, ProcessLib::LIE::SmallDeformation::SmallDeformationLocalAssemblerInterface, ProcessLib::LIE::HydroMechanics::HydroMechanicsLocalAssemblerInterface, and ProcessLib::SmallDeformationNonlocal::SmallDeformationNonlocalLocalAssembler< ShapeFunction, DisplacementDim >.

Definition at line 45 of file LocalAssemblerInterface.cpp.

51{
53 "The assembleWithJacobian() function is not implemented in the local "
54 "assembler.");
55}

References OGS_FATAL.

Referenced by ProcessLib::AnalyticalJacobianAssembler::assembleWithJacobian().

◆ assembleWithJacobianForStaggeredScheme()

void ProcessLib::LocalAssemblerInterface::assembleWithJacobianForStaggeredScheme ( double const t,
double const dt,
Eigen::VectorXd const & local_x,
Eigen::VectorXd const & local_x_prev,
int const process_id,
std::vector< double > & local_b_data,
std::vector< double > & local_Jac_data )
virtual

◆ computeSecondaryVariable()

void ProcessLib::LocalAssemblerInterface::computeSecondaryVariable ( std::size_t const mesh_item_id,
std::vector< NumLib::LocalToGlobalIndexMap const * > const & dof_tables,
double const t,
double const dt,
std::vector< GlobalVector * > const & x,
GlobalVector const & x_prev,
int const process_id )
virtual

Definition at line 68 of file LocalAssemblerInterface.cpp.

73{
74 auto const local_x = NumLib::getLocalX(mesh_item_id, dof_tables, x);
75
76 // Todo: A more decent way is to directly pass x_prevs as done for x
77 auto const indices =
78 NumLib::getIndices(mesh_item_id, *dof_tables[process_id]);
79 auto const local_x_prev_vec = x_prev.get(indices);
80 auto const local_x_prev = MathLib::toVector(local_x_prev_vec);
81
82 computeSecondaryVariableConcrete(t, dt, local_x, local_x_prev);
83}
virtual void computeSecondaryVariableConcrete(double const, double const, Eigen::VectorXd const &, Eigen::VectorXd const &)
Eigen::Map< const Vector > toVector(std::vector< double > const &data, Eigen::VectorXd::Index size)
Creates an Eigen mapped vector from the given data vector.
std::vector< GlobalIndexType > getIndices(std::size_t const mesh_item_id, NumLib::LocalToGlobalIndexMap const &dof_table)
Eigen::VectorXd getLocalX(std::size_t const mesh_item_id, std::vector< NumLib::LocalToGlobalIndexMap const * > const &dof_tables, std::vector< GlobalVector * > const &x)

References computeSecondaryVariableConcrete(), MathLib::EigenVector::get(), NumLib::getIndices(), NumLib::getLocalX(), and MathLib::toVector().

Referenced by ProcessLib::WellboreSimulator::WellboreSimulatorProcess::computeSecondaryVariableConcrete(), ProcessLib::HeatConduction::HeatConductionProcess::computeSecondaryVariableConcrete(), ProcessLib::HeatTransportBHE::HeatTransportBHEProcess::computeSecondaryVariableConcrete(), ProcessLib::LargeDeformation::LargeDeformationProcess< DisplacementDim >::computeSecondaryVariableConcrete(), ProcessLib::LIE::SmallDeformation::SmallDeformationProcess< DisplacementDim >::computeSecondaryVariableConcrete(), ProcessLib::LiquidFlow::LiquidFlowProcess::computeSecondaryVariableConcrete(), ProcessLib::SmallDeformation::SmallDeformationProcess< DisplacementDim >::computeSecondaryVariableConcrete(), ProcessLib::ThermoRichardsFlow::ThermoRichardsFlowProcess::computeSecondaryVariableConcrete(), ProcessLib::ComponentTransport::ComponentTransportProcess::computeSecondaryVariableConcrete(), and ProcessLib::StokesFlow::StokesFlowProcess< GlobalDim >::computeSecondaryVariableConcrete().

◆ computeSecondaryVariableConcrete()

virtual void ProcessLib::LocalAssemblerInterface::computeSecondaryVariableConcrete ( double const ,
double const ,
Eigen::VectorXd const & ,
Eigen::VectorXd const &  )
inlineprivatevirtual

◆ getFlux() [1/2]

virtual Eigen::Vector3d ProcessLib::LocalAssemblerInterface::getFlux ( MathLib::Point3d const & ,
double const ,
std::vector< double > const &  ) const
inlinevirtual

Computes the flux in the point p_local_coords that is given in local coordinates using the values from local_x. Fits to monolithic scheme.

Reimplemented in ProcessLib::LiquidFlow::LiquidFlowLocalAssembler< ShapeFunction, GlobalDim >, ProcessLib::SteadyStateDiffusion::LocalAssemblerData< ShapeFunction, GlobalDim >, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >, ProcessLib::HT::HTFEM< ShapeFunction, GlobalDim >, and ProcessLib::HT::HTLocalAssemblerInterface.

Definition at line 101 of file LocalAssemblerInterface.h.

105 {
106 return Eigen::Vector3d{};
107 }

◆ getFlux() [2/2]

virtual Eigen::Vector3d ProcessLib::LocalAssemblerInterface::getFlux ( MathLib::Point3d const & ,
double const ,
std::vector< std::vector< double > > const &  ) const
inlinevirtual

Fits to staggered scheme.

Definition at line 110 of file LocalAssemblerInterface.h.

114 {
115 return Eigen::Vector3d{};
116 }

◆ initialize()

◆ initializeConcrete()

virtual void ProcessLib::LocalAssemblerInterface::initializeConcrete ( )
inlineprivatevirtual

◆ postNonLinearSolver()

void ProcessLib::LocalAssemblerInterface::postNonLinearSolver ( std::size_t const mesh_item_id,
std::vector< NumLib::LocalToGlobalIndexMap const * > const & dof_tables,
std::vector< GlobalVector * > const & x,
std::vector< GlobalVector * > const & x_prev,
double const t,
double const dt,
int const process_id )

Definition at line 127 of file LocalAssemblerInterface.cpp.

133{
134 auto const local_x = NumLib::getLocalX(mesh_item_id, dof_tables, x);
135 auto const local_x_prev =
136 NumLib::getLocalX(mesh_item_id, dof_tables, x_prev);
137
138 postNonLinearSolverConcrete(local_x, local_x_prev, t, dt, process_id);
139}
virtual void postNonLinearSolverConcrete(Eigen::VectorXd const &, Eigen::VectorXd const &, double const, double const, int const)

References NumLib::getLocalX(), and postNonLinearSolverConcrete().

Referenced by ProcessLib::ThermoMechanicalPhaseField::ThermoMechanicalPhaseFieldProcess< DisplacementDim >::postNonLinearSolverConcreteProcess().

◆ postNonLinearSolverConcrete()

virtual void ProcessLib::LocalAssemblerInterface::postNonLinearSolverConcrete ( Eigen::VectorXd const & ,
Eigen::VectorXd const & ,
double const ,
double const ,
int const  )
inlineprivatevirtual

◆ postTimestep()

void ProcessLib::LocalAssemblerInterface::postTimestep ( std::size_t const mesh_item_id,
std::vector< NumLib::LocalToGlobalIndexMap const * > const & dof_tables,
std::vector< GlobalVector * > const & x,
std::vector< GlobalVector * > const & x_prev,
double const t,
double const dt,
int const process_id )
virtual

Definition at line 113 of file LocalAssemblerInterface.cpp.

119{
120 auto const local_x = NumLib::getLocalX(mesh_item_id, dof_tables, x);
121 auto const local_x_prev =
122 NumLib::getLocalX(mesh_item_id, dof_tables, x_prev);
123
124 postTimestepConcrete(local_x, local_x_prev, t, dt, process_id);
125}
virtual void postTimestepConcrete(Eigen::VectorXd const &, Eigen::VectorXd const &, double const, double const, int const)

References NumLib::getLocalX(), and postTimestepConcrete().

Referenced by ProcessLib::WellboreSimulator::WellboreSimulatorProcess::postTimestepConcreteProcess(), ProcessLib::ComponentTransport::ComponentTransportProcess::postTimestepConcreteProcess(), ProcessLib::StokesFlow::StokesFlowProcess< GlobalDim >::postTimestepConcreteProcess(), ProcessLib::ThermoMechanics::ThermoMechanicsProcess< DisplacementDim >::postTimestepConcreteProcess(), ProcessLib::ThermoRichardsFlow::ThermoRichardsFlowProcess::postTimestepConcreteProcess(), ProcessLib::LargeDeformation::LargeDeformationProcess< DisplacementDim >::postTimestepConcreteProcess(), ProcessLib::LIE::HydroMechanics::HydroMechanicsProcess< GlobalDim >::postTimestepConcreteProcess(), ProcessLib::SmallDeformation::SmallDeformationProcess< DisplacementDim >::postTimestepConcreteProcess(), ProcessLib::SmallDeformationNonlocal::SmallDeformationNonlocalProcess< DisplacementDim >::postTimestepConcreteProcess(), and ProcessLib::ThermoMechanicalPhaseField::ThermoMechanicalPhaseFieldProcess< DisplacementDim >::postTimestepConcreteProcess().

◆ postTimestepConcrete()

virtual void ProcessLib::LocalAssemblerInterface::postTimestepConcrete ( Eigen::VectorXd const & ,
Eigen::VectorXd const & ,
double const ,
double const ,
int const  )
inlineprivatevirtual

Reimplemented in ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >, ProcessLib::PhaseField::PhaseFieldLocalAssembler< ShapeFunction, DisplacementDim >, ProcessLib::SmallDeformationNonlocal::SmallDeformationNonlocalLocalAssembler< ShapeFunction, DisplacementDim >, ProcessLib::TH2M::TH2MLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >, ProcessLib::ThermoMechanicalPhaseField::ThermoMechanicalPhaseFieldLocalAssembler< ShapeFunction, DisplacementDim >, ProcessLib::ThermoMechanics::ThermoMechanicsLocalAssembler< ShapeFunction, DisplacementDim >, ProcessLib::ThermoRichardsFlow::ThermoRichardsFlowLocalAssembler< ShapeFunction, GlobalDim >, ProcessLib::ThermoRichardsMechanics::LocalAssemblerInterface< DisplacementDim, ConstitutiveTraits >, ProcessLib::WellboreSimulator::WellboreSimulatorFEM< ShapeFunction, GlobalDim >, ProcessLib::RichardsMechanics::LocalAssemblerInterface< DisplacementDim >, ProcessLib::HydroMechanics::HydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >, ProcessLib::LargeDeformation::LargeDeformationLocalAssembler< ShapeFunction, DisplacementDim >, ProcessLib::SmallDeformation::SmallDeformationLocalAssembler< ShapeFunction, DisplacementDim >, ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >, and ProcessLib::LIE::HydroMechanics::HydroMechanicsLocalAssemblerInterface.

Definition at line 131 of file LocalAssemblerInterface.h.

135 {
136 }

Referenced by postTimestep().

◆ preAssemble()

virtual void ProcessLib::LocalAssemblerInterface::preAssemble ( double const ,
double const ,
std::vector< double > const &  )
inlinevirtual

◆ preTimestep()

◆ preTimestepConcrete()

◆ setInitialConditions()

void ProcessLib::LocalAssemblerInterface::setInitialConditions ( std::size_t const mesh_item_id,
std::vector< NumLib::LocalToGlobalIndexMap const * > const & dof_tables,
std::vector< GlobalVector * > const & x,
double const t,
int const process_id )
virtual

Definition at line 85 of file LocalAssemblerInterface.cpp.

89{
90 auto local_x = NumLib::getLocalX(mesh_item_id, dof_tables, x);
91
92 setInitialConditionsConcrete(local_x, t, process_id);
93}
virtual void setInitialConditionsConcrete(Eigen::VectorXd const, double const, int const)

References NumLib::getLocalX(), and setInitialConditionsConcrete().

Referenced by ProcessLib::ThermoRichardsFlow::ThermoRichardsFlowProcess::setInitialConditionsConcreteProcess().

◆ setInitialConditionsConcrete()


The documentation for this class was generated from the following files: