Skip to content
Snippets Groups Projects
Commit 8947f1ee authored by Maltez Cavalheiro Kévin's avatar Maltez Cavalheiro Kévin
Browse files

inclusion du code de Pierre-Yves, gestion de différents types de mesh avec...

inclusion du code de Pierre-Yves, gestion de différents types de mesh avec ElementNodeData  avec element order 1 et 2
parent 7f1e49f8
No related branches found
No related tags found
1 merge request!6merge kevin branch
This diff is collapsed.
......@@ -11,29 +11,32 @@ using namespace std;
using namespace gmsh;
using namespace Eigen;
void show_mat(MatrixXd &A);
void show_vec(VectorXd &A);
double compute_angle(double &deltaX1, double &deltaX2, double &deltaY1, double &deltaY2);
int code_py(int argc, char **argv);
// Each element has all its information gathered as in this structure.
struct elementStruct
{
struct elementStruct{
int tag; // tag of the element
string bcType; // "dirichlet" or "neumann" (at the end, should replace this by an int or boolean)
double bcValue [2]; // values of [u, u_n]
int nodeTags [2]; // tags of the [first, second] nodes of the element
size_t nodeTags [2]; // tags of the [first, second] nodes of the element
size_t midNodeTags;
double length;
double x1, y1, x2, y2;
double midX, midY;
double deltaX, deltaY;
};
void get_bc_from_onelab(vector<elementStruct> &elementVector, int &dirichletCount, bool &dispHierarchy, vector<double> &allCoord);
void compute_g(double &jMidX, double &jDeltaX, double &jMidY, double &jDeltaY, double &iMidX, double &iMidY, double &jLength, double &g);
void compute_internal_phi(vector<double> &allCoord,vector<size_t> &NodeTags2d, vector<elementStruct> &elementVector, vector<vector<double>> &data_boundary_nodes, vector<vector<double>> &data2d, map<int,double> &nodeMapDomain);
int solverBEMFun(int argc, char **argv, std::vector<size_t> &finalElementTags, std::vector<double> &electrostaticPressure);
void dispNodeCoordFun(const vector<size_t> &allNodeTags, const vector<double> &allCoord);
void dispMatricesFun(const MatrixXd &A, const MatrixXd &B, const MatrixXd &c, const MatrixXd &b, const MatrixXd &x);
void dispValuesFun(const vector<elementStruct> &elementVector);
void getBC(map<std::size_t, int> allNodeIndex, const vector<double> &allCoord, vector<elementStruct> &elementVector, int &dirichletCount, const bool dispHierarchy, vector<size_t> &NodeTags2d_domain, vector<double> &NodeCoord2d_domain);
void computeGeometricParam(elementStruct &element, map<std::size_t, int> allNodeIndex, const vector<double> &allCoord);
double computeH(const double x, const double y, const elementStruct &element);
double computeG(const double x, const double y, const elementStruct &element, const string integrationType);
void computeData(const vector<elementStruct> &elementVector, const vector<int> &elementTypes, const vector<vector<size_t>> &elementTags, vector<size_t> &tags, vector<vector<double>> &data, const string integrationType);
void displayData(const string viewName, const string modelName, const string fileName, const vector<size_t> &tags, const vector<vector<double>> &data);
void compute_internal_phi(vector<double> &allCoord,vector<size_t> &NodeTags2d_domain, vector<elementStruct> &elementVector, map<int,double> &nodeMapDomain, const string integrationType);
void element_node_data(vector<vector<vector<double>>> &data, vector<vector<size_t>> &elementTags2d, vector<int> &elementTypes2d, vector<vector<size_t>> &nodeTags2d, vector<elementStruct> &elementVector, map<int, double> &nodeMapDomain, bool &show_element_node_data);
void disp_element_node_data(vector<int> &nodes_commun_tag, vector<int> &elements_commun_tag);
Lx = 1;
Ly = 1;
nx = 4;
ny = 4;
nx = 100;
ny = 100;
Point(1) = {0, 0, 0, 1.0};
Point(2) = {Lx, 0, 0, 1.0};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment