Commit 1267d982 authored by GILLES Sebastien's avatar GILLES Sebastien
Browse files

#820 Poromechanics: create skeleton of implicit fluid step varf.

parent 0513ae66
......@@ -445,6 +445,7 @@
BE50E8FF1C903BCC0038D16E /* None.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE50E8FE1C903BCC0038D16E /* None.cpp */; };
BE50E9021C903BDF0038D16E /* None.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE50E9001C903BDF0038D16E /* None.cpp */; };
BE50E9031C903BDF0038D16E /* Viscoelasticity.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE50E9011C903BDF0038D16E /* Viscoelasticity.cpp */; };
BE51CDB41CA3FE9400B66D2A /* ImplicitStepFluidVariationalFormulation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE51CDB11CA3FE9400B66D2A /* ImplicitStepFluidVariationalFormulation.cpp */; };
BE5389FD1C897FE400D80749 /* Mpi.hpp in Headers */ = {isa = PBXBuildFile; fileRef = BE5389FB1C897FE400D80749 /* Mpi.hpp */; };
BE5389FE1C897FE400D80749 /* Mpi.hxx in Headers */ = {isa = PBXBuildFile; fileRef = BE5389FC1C897FE400D80749 /* Mpi.hxx */; };
BE538A041C89B97800D80749 /* CoordIndexes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE538A011C89B97800D80749 /* CoordIndexes.cpp */; };
......@@ -4411,6 +4412,9 @@
BE50E8FE1C903BCC0038D16E /* None.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = None.cpp; sourceTree = "<group>"; };
BE50E9001C903BDF0038D16E /* None.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = None.cpp; sourceTree = "<group>"; };
BE50E9011C903BDF0038D16E /* Viscoelasticity.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Viscoelasticity.cpp; sourceTree = "<group>"; };
BE51CDB11CA3FE9400B66D2A /* ImplicitStepFluidVariationalFormulation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ImplicitStepFluidVariationalFormulation.cpp; sourceTree = "<group>"; };
BE51CDB21CA3FE9400B66D2A /* ImplicitStepFluidVariationalFormulation.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = ImplicitStepFluidVariationalFormulation.hpp; sourceTree = "<group>"; };
BE51CDB31CA3FE9400B66D2A /* ImplicitStepFluidVariationalFormulation.hxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = ImplicitStepFluidVariationalFormulation.hxx; sourceTree = "<group>"; };
BE52B1A71C8DDC9A009B7857 /* ModelInitialize.hxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = ModelInitialize.hxx; sourceTree = "<group>"; };
BE5389FB1C897FE400D80749 /* Mpi.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = Mpi.hpp; sourceTree = "<group>"; };
BE5389FC1C897FE400D80749 /* Mpi.hxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = Mpi.hxx; sourceTree = "<group>"; };
......@@ -9628,6 +9632,9 @@
BE70ACF81C91D2BA0042716C /* ExplicitStepVariationalFormulation.cpp */,
BE70ACF91C91D2BA0042716C /* ExplicitStepVariationalFormulation.hpp */,
BE70ACFA1C91D2BA0042716C /* ExplicitStepVariationalFormulation.hxx */,
BE51CDB11CA3FE9400B66D2A /* ImplicitStepFluidVariationalFormulation.cpp */,
BE51CDB21CA3FE9400B66D2A /* ImplicitStepFluidVariationalFormulation.hpp */,
BE51CDB31CA3FE9400B66D2A /* ImplicitStepFluidVariationalFormulation.hxx */,
BE5674101C722F3F00B2BBAD /* SolidVariationalFormulationPolicy */,
BE58420E1C6B8C480040C694 /* GlobalVariationalOperatorInstances */,
BE58420F1C6B8C480040C694 /* LocalVariationalOperatorInstances */,
......@@ -12009,6 +12016,7 @@
buildActionMask = 2147483647;
files = (
BE946D881C7DF62A003A829A /* PorosityVariationalFormulation.cpp in Sources */,
BE51CDB41CA3FE9400B66D2A /* ImplicitStepFluidVariationalFormulation.cpp in Sources */,
BEF1832C1C6DE3B2008A6F1E /* Ale.cpp in Sources */,
BE83AF341C733EAD002C6FA3 /* StVenantKirchhoff.cpp in Sources */,
BE9BE1B51C96D02B0065BEFE /* SolidOnFluidMesh.cpp in Sources */,
......
//! \file
//
//
// ImplicitStepFluidVariationalFormulation.cpp
// HappyHeart
//
// Created by Sebastien Gilles on 24/03/16.
// Copyright © 2016 Inria. All rights reserved.
//
#include "ModelInstances/UnderDevelopment/Poromechanics/ImplicitStepFluidVariationalFormulation.hpp"
namespace HappyHeart
{
namespace PoromechanicsNS
{
namespace ImplicitStepFluidNS
{
VariationalFormulation
::VariationalFormulation(const Wrappers::Mpi& mpi,
const TimeManager& time_manager,
const GodOfDof& god_of_dof,
DirichletBoundaryCondition::vector_shared_ptr&& boundary_condition_list)
: parent(mpi,
time_manager,
god_of_dof,
std::move(boundary_condition_list))
{ }
void VariationalFormulation::AllocateMatricesAndVectors()
{
// TODO Set here the pattern of all global matrices and vectors.
// Typically it should be something like:
//
// \code
// const auto& numbering_subset1 = GetNumberingSubset1(); // accessor you have to defined in new class; name it as appropriate!
// const auto& numbering_subset2 = GetNumberingSubset2();
//
// // Allocate the relevant block matrix. Below an example for Stokes model, in which only upper blocks
// // in the matrix need to be allocated.
// parent::AllocateGlobalMatrix(numbering_subset1, numbering_subset1);
// parent::AllocateGlobalMatrix(numbering_subset1, numbering_subset2);
//
// // Same for vector; system_rhs and system_solution are allocated here.
// parent::AllocateGlobalVector(numbering_subset);
//
// Access to the newly allocated matrix and vectors.
// const auto& system_matrix = GetSystemMatrix(numbering_subset1, numbering_subset1);
// const auto& system_rhs = GetSystemRhs(numbering_subset1);
//
// // Allocate your problem specific matrices and vectors, by coping structure of the ones allocated above.
// GetNonCstVectorCurrentVolumicSource().CompleteCopy(system_rhs, __FILE__, __LINE__);
// ...
//
// \endcode
}
void VariationalFormulation::SupplInit(const InputParameterList& input_parameter_data)
{
}
} // namespace ImplicitStepFluidNS
} // namespace PoromechanicsNS
} // namespace HappyHeart
//! \file
//
//
// ImplicitStepFluidVariationalFormulation.hpp
// HappyHeart
//
// Created by Sebastien Gilles on 24/03/16.
// Copyright © 2016 Inria. All rights reserved.
//
#ifndef HAPPY_HEART_x_MODEL_INSTANCES_x_UNDER_DEVELOPMENT_x_POROMECHANICS_x_IMPLICIT_STEP_FLUID_VARIATIONAL_FORMULATION_HPP_
# define HAPPY_HEART_x_MODEL_INSTANCES_x_UNDER_DEVELOPMENT_x_POROMECHANICS_x_IMPLICIT_STEP_FLUID_VARIATIONAL_FORMULATION_HPP_
# include <memory>
# include <vector>
# include "Utilities/InputParameterList/OpsFunction.hpp"
# include "Geometry/Domain.hpp"
# include "FormulationSolver/VariationalFormulation.hpp"
# include "ModelInstances/UnderDevelopment/Poromechanics/InputParameterList.hpp"
namespace HappyHeart
{
namespace PoromechanicsNS
{
namespace ImplicitStepFluidNS
{
class VariationalFormulation
: public HappyHeart::VariationalFormulation
<
VariationalFormulation,
EnumUnderlyingType(SolverIndex::main_solver)
>
{
private:
//! Alias to self.
using self = VariationalFormulation;
//! Alias to the parent class.
using parent = HappyHeart::VariationalFormulation
<
self,
EnumUnderlyingType(SolverIndex::main_solver)
>;
//! Friendship to parent class, so this one can access private methods defined below through CRTP.
friend parent;
public:
//! Alias to unique pointer.
using unique_ptr = std::unique_ptr<self>;
public:
/// \name Special members.
///@{
//! Constructor.
explicit VariationalFormulation(const Wrappers::Mpi& mpi,
const TimeManager& time_manager,
const GodOfDof& god_of_dof,
DirichletBoundaryCondition::vector_shared_ptr&& boundary_condition_list);
//! Destructor.
~VariationalFormulation() = default;
//! Copy constructor.
VariationalFormulation(const VariationalFormulation&) = delete;
//! Move constructor.
VariationalFormulation(VariationalFormulation&&) = delete;
//! Copy affectation.
VariationalFormulation& operator=(const VariationalFormulation&) = delete;
//! Move affectation.
VariationalFormulation& operator=(VariationalFormulation&&) = delete;
///@}
private:
/// \name CRTP-required methods.
///@{
/*!
* \brief Specific initialisation for derived class attributes.
*
* \internal <b><tt>[internal]</tt></b> This method is called by base class method VariationalFormulation::Init().
*/
void SupplInit(const InputParameterList& input_parameter_data);
/*!
* \brief Allocate the global matrices and vectors.
*/
void AllocateMatricesAndVectors();
//! Define the pointer function required to calculate the function required by the non-linear problem.
Wrappers::Petsc::Snes::SNESFunction ImplementSnesFunction() const;
//! Define the pointer function required to calculate the jacobian required by the non-linear problem.
Wrappers::Petsc::Snes::SNESJacobian ImplementSnesJacobian() const;
//! Define the pointer function required to view the results required by the non-linear problem.
Wrappers::Petsc::Snes::SNESViewer ImplementSnesViewer() const;
///@}
private:
/// \name Global variational operators.
///@{
///@}
private:
/// \name Global vectors and matrices specific to the problem.
///@{
///@}
private:
};
} // namespace ImplicitStepFluidNS
} // namespace PoromechanicsNS
} // namespace HappyHeart
# include "ModelInstances/UnderDevelopment/Poromechanics/ImplicitStepFluidVariationalFormulation.hxx"
#endif // HAPPY_HEART_x_MODEL_INSTANCES_x_UNDER_DEVELOPMENT_x_POROMECHANICS_x_IMPLICIT_STEP_FLUID_VARIATIONAL_FORMULATION_HPP_
//! \file
//
//
// ImplicitStepFluidVariationalFormulation.hxx
// HappyHeart
//
// Created by Sebastien Gilles on 24/03/16.
// Copyright © 2016 Inria. All rights reserved.
//
#ifndef HAPPY_HEART_x_MODEL_INSTANCES_x_UNDER_DEVELOPMENT_x_POROMECHANICS_x_IMPLICIT_STEP_FLUID_VARIATIONAL_FORMULATION_HXX_
# define HAPPY_HEART_x_MODEL_INSTANCES_x_UNDER_DEVELOPMENT_x_POROMECHANICS_x_IMPLICIT_STEP_FLUID_VARIATIONAL_FORMULATION_HXX_
namespace HappyHeart
{
namespace PoromechanicsNS
{
namespace ImplicitStepFluidNS
{
inline Wrappers::Petsc::Snes::SNESFunction VariationalFormulation::ImplementSnesFunction() const
{
// \todo #820 At the moment, write manually the Newton (easier to reproduce Freefem's result).
// However once it works SNES should be used.
return nullptr;
}
inline Wrappers::Petsc::Snes::SNESJacobian VariationalFormulation::ImplementSnesJacobian() const
{
// \todo #820 At the moment, write manually the Newton (easier to reproduce Freefem's result).
// However once it works SNES should be used.
return nullptr;
}
inline Wrappers::Petsc::Snes::SNESViewer VariationalFormulation::ImplementSnesViewer() const
{
// \todo #820 At the moment, write manually the Newton (easier to reproduce Freefem's result).
// However once it works SNES should be used.
return nullptr;
}
} // namespace ImplicitStepFluidNS
} // namespace PoromechanicsNS
} // namespace HappyHeart
#endif // HAPPY_HEART_x_MODEL_INSTANCES_x_UNDER_DEVELOPMENT_x_POROMECHANICS_x_IMPLICIT_STEP_FLUID_VARIATIONAL_FORMULATION_HXX_
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment