v0.13.1
Loading...
Searching...
No Matches
Classes | Typedefs | Enumerations | Functions | Variables
fluid_structure_eigenproblem.cpp File Reference
#include <MoFEM.hpp>
#include <slepceps.h>
#include <slepcpep.h>
#include <OpPostProcElastic.hpp>

Go to the source code of this file.

Classes

struct  ElementsAndOps< DIM >
 
struct  ElementsAndOps< 2 >
 
struct  ElementsAndOps< 3 >
 
struct  OpCalculateSideData
 Operator tp collect data from elements on the side of Edge/Face. More...
 
struct  OpLhsSkeleton
 Operator the left hand side matrix. More...
 
struct  FSI
 

Typedefs

using EntData = EntitiesFieldData::EntData
 
using DomainEle = ElementsAndOps< SPACE_DIM >::DomainEle
 
using DomainEleOp = ElementsAndOps< SPACE_DIM >::DomainEleOp
 
using PostProcEle = ElementsAndOps< SPACE_DIM >::PostProcEle
 
using FaceSideEle = ElementsAndOps< SPACE_DIM >::FaceSideEle
 
using FaceSideOp = ElementsAndOps< SPACE_DIM >::FaceSideOp
 
using SkeletonEle = ElementsAndOps< SPACE_DIM >::SkeletonEle
 
using SkeletonEleOp = ElementsAndOps< SPACE_DIM >::SkeletonEleOp
 
using OpK = FormsIntegrators< DomainEleOp >::Assembly< PETSC >::BiLinearForm< GAUSS >::OpGradSymTensorGrad< 1, SPACE_DIM, SPACE_DIM, 0 >
 
using OpMass = FormsIntegrators< DomainEleOp >::Assembly< PETSC >::BiLinearForm< GAUSS >::OpMass< 1, SPACE_DIM >
 

Enumerations

enum  ElementSide { LEFT_SIDE = 0 , RIGHT_SIDE , LEFT_SIDE = 0 , RIGHT_SIDE }
 

Functions

int main (int argc, char *argv[])
 
template<typename T >
auto get_ntensor (T &base_mat)
 
template<typename T >
auto get_ntensor (T &base_mat, int gg, int bb)
 
template<typename T >
auto get_diff_ntensor (T &base_mat)
 
template<typename T >
auto get_diff_ntensor (T &base_mat, int gg, int bb)
 

Variables

constexpr int SPACE_DIM
 
FTensor::Index< 'i', SPACE_DIMi
 
FTensor::Index< 'j', SPACE_DIMj
 
FTensor::Index< 'k', SPACE_DIMk
 
FTensor::Index< 'l', SPACE_DIMl
 
FTensor::Index< 'm', SPACE_DIMm
 
FTensor::Index< 'n', SPACE_DIMn
 
static double penalty = 1e2
 
static double phi = -1
 
double rho_solid = 2.28
 
double K_solid = 95 * 1e3
 
double G_solid = 63 * 1e3
 
double rho_fluid = 0.998
 
double K_fluid = 2.2 * 1e3
 
double G_fluid = 1e-6
 
double MU_fluid = 1e-3
 
int order = 1
 
double eig_threshold = 1e-1
 
auto poisson_ratio = 0.265
 
static char help [] = "...\n\n"
 [Postprocess results] More...
 
std::array< std::vector< VectorInt >, 2 > indicesUsSideMap
 
std::array< std::vector< VectorInt >, 2 > indicesUfSideMap
 
std::array< std::vector< MatrixDouble >, 2 > baseUfSideMap
 
std::array< std::vector< MatrixDouble >, 2 > diffUfBaseSideMap
 
std::array< std::vector< MatrixDouble >, 2 > baseUsSideMap
 
std::array< std::vector< MatrixDouble >, 2 > diffUsBaseSideMap
 
std::array< EntityHandle, 2 > sideHandle
 
std::array< double, 2 > areaMap
 
std::array< int, 2 > senseMap
 

Typedef Documentation

◆ DomainEle

Definition at line 46 of file fluid_structure_eigenproblem.cpp.

◆ DomainEleOp

Definition at line 47 of file fluid_structure_eigenproblem.cpp.

◆ EntData

Definition at line 45 of file fluid_structure_eigenproblem.cpp.

◆ FaceSideEle

Definition at line 50 of file fluid_structure_eigenproblem.cpp.

◆ FaceSideOp

◆ OpK

using OpK = FormsIntegrators<DomainEleOp>::Assembly<PETSC>::BiLinearForm< GAUSS>::OpGradSymTensorGrad<1, SPACE_DIM, SPACE_DIM, 0>

Definition at line 56 of file fluid_structure_eigenproblem.cpp.

◆ OpMass

using OpMass = FormsIntegrators<DomainEleOp>::Assembly<PETSC>::BiLinearForm< GAUSS>::OpMass<1, SPACE_DIM>

◆ PostProcEle

Definition at line 48 of file fluid_structure_eigenproblem.cpp.

◆ SkeletonEle

Definition at line 53 of file fluid_structure_eigenproblem.cpp.

◆ SkeletonEleOp

Definition at line 54 of file fluid_structure_eigenproblem.cpp.

Enumeration Type Documentation

◆ ElementSide

Enumerator
LEFT_SIDE 
RIGHT_SIDE 
LEFT_SIDE 
RIGHT_SIDE 

Definition at line 1014 of file fluid_structure_eigenproblem.cpp.

Function Documentation

◆ get_diff_ntensor() [1/2]

template<typename T >
auto get_diff_ntensor ( T base_mat)
inline
Examples
plate.cpp.

Definition at line 1026 of file fluid_structure_eigenproblem.cpp.

1026 {
1027 double *ptr = &*base_mat.data().begin();
1028 return getFTensor1FromPtr<SPACE_DIM>(ptr);
1029};

◆ get_diff_ntensor() [2/2]

template<typename T >
auto get_diff_ntensor ( T base_mat,
int  gg,
int  bb 
)
inline

Definition at line 1032 of file fluid_structure_eigenproblem.cpp.

1032 {
1033 double *ptr = &base_mat(gg, SPACE_DIM * bb);
1034 return getFTensor1FromPtr<SPACE_DIM>(ptr);
1035};
constexpr int SPACE_DIM

◆ get_ntensor() [1/2]

template<typename T >
auto get_ntensor ( T base_mat)
inline
Examples
plate.cpp.

Definition at line 1016 of file fluid_structure_eigenproblem.cpp.

1016 {
1018 &*base_mat.data().begin());
1019};

◆ get_ntensor() [2/2]

template<typename T >
auto get_ntensor ( T base_mat,
int  gg,
int  bb 
)
inline

Definition at line 1021 of file fluid_structure_eigenproblem.cpp.

1021 {
1022 double *ptr = &base_mat(gg, bb);
1024};

◆ main()

int main ( int  argc,
char *  argv[] 
)

[Register MoFEM discrete manager in PETSc]

[Register MoFEM discrete manager in PETSc

[Create MoAB]

< mesh database

< mesh database interface

[Create MoAB]

[Create MoFEM]

< finite element database

< finite element database insterface

[Create MoFEM]

[FSI]

[FSI]

Definition at line 882 of file fluid_structure_eigenproblem.cpp.

882 {
883
884 // Initialisation of MoFEM/PETSc and MOAB data structures
885 const char param_file[] = "param_file.petsc";
886 SlepcInitialize(&argc, &argv, param_file, help);
888
889 // Add logging channel for FSI
890 auto core_log = logging::core::get();
891 core_log->add_sink(LogManager::createSink(LogManager::getStrmWorld(), "FSI"));
892 LogManager::setLog("FSI");
893 MOFEM_LOG_TAG("FSI", "FSI");
894
895 try {
896
897 //! [Register MoFEM discrete manager in PETSc]
898 DMType dm_name = "DMMOFEM";
899 CHKERR DMRegister_MoFEM(dm_name);
900 //! [Register MoFEM discrete manager in PETSc
901
902 //! [Create MoAB]
903 moab::Core mb_instance; ///< mesh database
904 moab::Interface &moab = mb_instance; ///< mesh database interface
905 //! [Create MoAB]
906
907 //! [Create MoFEM]
908 MoFEM::Core core(moab); ///< finite element database
909 MoFEM::Interface &m_field = core; ///< finite element database insterface
910 //! [Create MoFEM]
911
912 //! [FSI]
913 FSI ex(m_field);
914 CHKERR ex.runProblem();
915 //! [FSI]
916 }
918
919 SlepcFinalize();
921}
std::string param_file
#define CATCH_ERRORS
Catch errors.
Definition: definitions.h:372
#define CHKERR
Inline error check.
Definition: definitions.h:535
static char help[]
[Postprocess results]
PetscErrorCode DMRegister_MoFEM(const char sname[])
Register MoFEM problem.
Definition: DMMMoFEM.cpp:47
static LoggerType & setLog(const std::string channel)
Set ans resset chanel logger.
Definition: LogManager.cpp:364
#define MOFEM_LOG_TAG(channel, tag)
Tag channel.
Definition: LogManager.hpp:332
Core (interface) class.
Definition: Core.hpp:82
static MoFEMErrorCode Initialize(int *argc, char ***args, const char file[], const char help[])
Initializes the MoFEM database PETSc, MOAB and MPI.
Definition: Core.cpp:72
static MoFEMErrorCode Finalize()
Checks for options to be called at the conclusion of the program.
Definition: Core.cpp:112
Deprecated interface functions.
static boost::shared_ptr< SinkType > createSink(boost::shared_ptr< std::ostream > stream_ptr, std::string comm_filter)
Create a sink object.
Definition: LogManager.cpp:279
static boost::shared_ptr< std::ostream > getStrmWorld()
Get the strm world object.
Definition: LogManager.cpp:323

Variable Documentation

◆ areaMap

std::array<double, 2> areaMap
Examples
plate.cpp.

Definition at line 933 of file fluid_structure_eigenproblem.cpp.

◆ baseUfSideMap

std::array<std::vector<MatrixDouble>, 2> baseUfSideMap

Definition at line 927 of file fluid_structure_eigenproblem.cpp.

◆ baseUsSideMap

std::array<std::vector<MatrixDouble>, 2> baseUsSideMap

Definition at line 929 of file fluid_structure_eigenproblem.cpp.

◆ diffUfBaseSideMap

std::array<std::vector<MatrixDouble>, 2> diffUfBaseSideMap

Definition at line 928 of file fluid_structure_eigenproblem.cpp.

◆ diffUsBaseSideMap

std::array<std::vector<MatrixDouble>, 2> diffUsBaseSideMap

Definition at line 930 of file fluid_structure_eigenproblem.cpp.

◆ eig_threshold

double eig_threshold = 1e-1

Definition at line 86 of file fluid_structure_eigenproblem.cpp.

◆ G_fluid

double G_fluid = 1e-6

Definition at line 81 of file fluid_structure_eigenproblem.cpp.

◆ G_solid

double G_solid = 63 * 1e3

Definition at line 77 of file fluid_structure_eigenproblem.cpp.

◆ help

char help[] = "...\n\n"
static

[Postprocess results]

Definition at line 880 of file fluid_structure_eigenproblem.cpp.

◆ i

Definition at line 61 of file fluid_structure_eigenproblem.cpp.

◆ indicesUfSideMap

std::array<std::vector<VectorInt>, 2> indicesUfSideMap

Definition at line 925 of file fluid_structure_eigenproblem.cpp.

◆ indicesUsSideMap

std::array<std::vector<VectorInt>, 2> indicesUsSideMap

Definition at line 924 of file fluid_structure_eigenproblem.cpp.

◆ j

Definition at line 62 of file fluid_structure_eigenproblem.cpp.

◆ k

Definition at line 63 of file fluid_structure_eigenproblem.cpp.

◆ K_fluid

double K_fluid = 2.2 * 1e3

Definition at line 80 of file fluid_structure_eigenproblem.cpp.

◆ K_solid

double K_solid = 95 * 1e3

Definition at line 76 of file fluid_structure_eigenproblem.cpp.

◆ l

Definition at line 64 of file fluid_structure_eigenproblem.cpp.

◆ m

◆ MU_fluid

double MU_fluid = 1e-3

Definition at line 82 of file fluid_structure_eigenproblem.cpp.

◆ n

◆ order

int order = 1
Examples
EshelbianPlasticity.cpp, HookeElement.cpp, MagneticElement.hpp, Remodeling.cpp, Remodeling.hpp, SmallStrainPlasticity.hpp, UnsaturatedFlow.hpp, analytical_nonlinear_poisson.cpp, analytical_poisson.cpp, analytical_poisson_field_split.cpp, approx_sphere.cpp, boundary_marker.cpp, build_large_problem.cpp, build_problems.cpp, cell_forces.cpp, child_and_parent.cpp, contact.cpp, continuity_check_on_contact_prism_side_ele.cpp, continuity_check_on_skeleton_3d.cpp, dm_build_partitioned_mesh.cpp, eigen_elastic.cpp, elasticity.cpp, field_blas.cpp, forces_and_sources_testing_edge_element.cpp, forces_and_sources_testing_flat_prism_element.cpp, forces_and_sources_testing_users_base.cpp, free_surface.cpp, hanging_node_approx.cpp, hcurl_check_approx_in_2d.cpp, hcurl_curl_operator.cpp, hcurl_divergence_operator_2d.cpp, hdiv_divergence_operator.cpp, heat_equation.cpp, heat_method.cpp, helmholtz.cpp, higher_derivatives.cpp, magnetostatic.cpp, minimal_surface_area.cpp, mixed_poisson.cpp, mortar_contact.cpp, mortar_contact_thermal.cpp, nonlinear_elastic.cpp, phase.cpp, photon_diffusion.cpp, plastic.cpp, plate.cpp, plot_base.cpp, prism_elements_from_surface.cpp, prism_polynomial_approximation.cpp, reaction_diffusion.cpp, remove_entities_from_problem.cpp, remove_entities_from_problem_not_partitioned.cpp, shallow_wave.cpp, simple_contact.cpp, simple_contact_thermal.cpp, simple_elasticity.cpp, test_jacobian_of_simple_contact_element.cpp, testing_jacobian_of_hook_element.cpp, testing_jacobian_of_hook_scaled_with_density_element.cpp, thermo_elastic.cpp, unsaturated_transport.cpp, and wave_equation.cpp.

Definition at line 84 of file fluid_structure_eigenproblem.cpp.

◆ penalty

double penalty = 1e2
static

◆ phi

double phi = -1
static

◆ poisson_ratio

auto poisson_ratio = 0.265

◆ rho_fluid

double rho_fluid = 0.998

Definition at line 79 of file fluid_structure_eigenproblem.cpp.

◆ rho_solid

double rho_solid = 2.28

Definition at line 75 of file fluid_structure_eigenproblem.cpp.

◆ senseMap

std::array<int, 2> senseMap
Examples
plate.cpp.

Definition at line 934 of file fluid_structure_eigenproblem.cpp.

◆ sideHandle

std::array<EntityHandle, 2> sideHandle

Definition at line 932 of file fluid_structure_eigenproblem.cpp.

◆ SPACE_DIM

constexpr int SPACE_DIM
constexpr
Initial value:
=
#define EXECUTABLE_DIMENSION
Definition: plastic.cpp:10

Definition at line 42 of file fluid_structure_eigenproblem.cpp.