1 #ifndef ABLATELIBRARY_FINITEELEMENTSOLVER_HPP
2 #define ABLATELIBRARY_FINITEELEMENTSOLVER_HPP
4 #include <solver/timeStepper.hpp>
7 #include "boundaryConditions/boundaryCondition.hpp"
9 #include "mathFunctions/fieldFunction.hpp"
10 #include "solver/solver.hpp"
12 namespace ablate::finiteElement {
16 const std::vector<std::shared_ptr<boundaryConditions::BoundaryCondition>> boundaryConditions;
17 const std::vector<std::shared_ptr<mathFunctions::FieldFunction>> auxiliaryFieldsUpdaters;
20 FiniteElementSolver(std::string solverId, std::shared_ptr<domain::Region> region, std::shared_ptr<parameters::Parameters> options,
21 std::vector<std::shared_ptr<boundaryConditions::BoundaryCondition>> boundaryConditions, std::vector<std::shared_ptr<mathFunctions::FieldFunction>> auxiliaryFields);
24 void Register(std::shared_ptr<ablate::domain::SubDomain> subDomain)
override;
25 void Setup()
override;
26 void Initialize()
override;
28 virtual void CompleteFlowInitialization(DM, Vec) = 0;
36 PetscErrorCode
ComputeIFunction(PetscReal time, Vec locX, Vec locX_t, Vec locF)
override;
37 PetscErrorCode ComputeIJacobian(PetscReal time, Vec locX, Vec locX_t, PetscReal X_tShift, Mat Jac, Mat JacP)
override;
38 PetscErrorCode ComputeBoundary(PetscReal time, Vec locX, Vec locX_t)
override;
Definition: finiteElementSolver.hpp:14
PetscErrorCode ComputeIFunction(PetscReal time, Vec locX, Vec locX_t, Vec locF) override
Definition: finiteElementSolver.cpp:88
void Register(std::shared_ptr< ablate::domain::SubDomain > subDomain) override
Definition: finiteElementSolver.cpp:33
void Setup() override
Definition: finiteElementSolver.cpp:35
static void UpdateAuxFields(TS ts, FiniteElementSolver &fe)
Definition: finiteElementSolver.cpp:62
Definition: boundaryFunction.hpp:8
Definition: iFunction.hpp:6
Definition: solver.hpp:17