Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An error occurred reading the comsol mphtxt grid file #15061

Closed
czimidone opened this issue Apr 10, 2023 · 0 comments
Closed

An error occurred reading the comsol mphtxt grid file #15061

czimidone opened this issue Apr 10, 2023 · 0 comments

Comments

@czimidone
Copy link

czimidone commented Apr 10, 2023

In the process of reading a COMSOL Multiphysics file (mphtxt) using GridIn, an error occurs when trying to read the mesh section.
I looked at the source code of "read_comsol_mphtxt function" and didn't find the problem.

The error message states:

An error occurred in line <1557> of file </home/dlut/software/dealii/dealii-9.4.1/source/grid/grid_in.cc> in function
void dealii::GridIn<dim, spacedim>::read_comsol_mphtxt(std::istream&) [with int dim = 2; int spacedim = 2; std::istream = std::basic_istream]
The violated condition was:
s == "4 Mesh"

the start of ”mphtxt“:

            # Created by COMSOL Multiphysics.
            
            # Major & minor version
            0 1 
            1 # number of tags
            # Tags
            5 mesh1 
            1 # number of types
            # Types
            3 obj 
            
            # --------- Object 0 ----------
            
            0 0 1 
            4 Mesh # class
            4 # version
            2 # sdim
            296 # number of mesh vertices
            0 # lowest mesh vertex index

main function:
GridIn grid_in;
grid_in.attach_triangulation(triangulation);
std::ifstream input_file("example.mphtxt");
grid_in.read_comsol_mphtxt(input_file);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant