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

Error: geometry adaption needs dune-subgrid? #3

Open
ftadel opened this issue Apr 21, 2020 · 10 comments
Open

Error: geometry adaption needs dune-subgrid? #3

ftadel opened this issue Apr 21, 2020 · 10 comments
Assignees

Comments

@ftadel
Copy link
Member

ftadel commented Apr 21, 2020

Input files:
tmp.zip

Error message:

DUNEURO> Installation path: C:\Users\franc\.brainstorm\bst_duneuro\bin\bst_duneuro_meeg_win64.exe
DUNEURO> Writing temporary files to: C:\Users\franc\.brainstorm\tmp
DUNEURO> Detected parameter: GeometryAdapted=true
DUNEURO> System call: "C:\Users\franc\.brainstorm\bst_duneuro\bin\bst_duneuro_meeg_win64.exe" "C:\Users\franc\.brainstorm\tmp\duneuro_minifile.mini"
DUNEURO> Error log:
Dune reported error: Dune::Exception [make_meeg_driver:/home/juan/bst-duneuro/src/duneuro/duneuro/meeg/meeg_driver_factory_impl.hh:203]: geometry adaption needs dune-subgrid
@ftadel
Copy link
Member Author

ftadel commented Apr 21, 2020

FYI: I removed the GeometryAdapted parameter from the interface, and instead detect it from the FEM mesh file, either from the parameters string if available, or directly from the geometry:
brainstorm-tools/brainstorm3@698b2c3

    if isfield(FemMat, 'History') && ~isempty(FemMat.History) && ~isempty(strfind([FemMat.History{:,3}], 'NodeShift'))
        strOptions = [FemMat.History{:,3}];
        iTag = strfind(strOptions, 'NodeShift');
        val = sscanf(strOptions(iTag:end), 'NodeShift=%f');
        if ~isempty(val)
            GeometryAdapted = (val > 0);
        end
    end
    % Otherwise, try to guess based on the geometry
    if isempty(GeometryAdapted)
        % Compute the distance between the first two nodes of each element
        dist = sqrt(sum([FemMat.Vertices(FemMat.Elements(:,1),1) - FemMat.Vertices(FemMat.Elements(:,2),1), ...
         FemMat.Vertices(FemMat.Elements(:,2),2) - FemMat.Vertices(FemMat.Elements(:,2),2), ...
         FemMat.Vertices(FemMat.Elements(:,2),3) - FemMat.Vertices(FemMat.Elements(:,2),3)] .^ 2, 2));
        % If the distance is not constant: then the geomtry is adapted
        GeometryAdapted = (max(abs(dist - dist(1))) > 1e-9);
    end

@tmedani
Copy link
Member

tmedani commented Apr 21, 2020

Input files:
tmp.zip

Error message:

DUNEURO> Installation path: C:\Users\franc\.brainstorm\bst_duneuro\bin\bst_duneuro_meeg_win64.exe
DUNEURO> Writing temporary files to: C:\Users\franc\.brainstorm\tmp
DUNEURO> Detected parameter: GeometryAdapted=true
DUNEURO> System call: "C:\Users\franc\.brainstorm\bst_duneuro\bin\bst_duneuro_meeg_win64.exe" "C:\Users\franc\.brainstorm\tmp\duneuro_minifile.mini"
DUNEURO> Error log:
Dune reported error: Dune::Exception [make_meeg_driver:/home/juan/bst-duneuro/src/duneuro/duneuro/meeg/meeg_driver_factory_impl.hh:203]: geometry adaption needs dune-subgrid

@juangpc did you have the same errors when you tested the application the 'eeg_transfer_cg_0000.ini' or 'eeg_transfer_cg_0002.ini'?

@juangpc
Copy link
Contributor

juangpc commented Apr 21, 2020

No, when testing with 0001.ini but I've never tested it with 0002.ini?

Do we need this? I could try to add the dune-subgrid module.

@tmedani
Copy link
Member

tmedani commented Apr 22, 2020

No, when testing with 0001.ini but I've never tested it with 0002.ini?

Do we need this? I could try to add the dune-subgrid module.

Hey Juan,
yes please, it seems that with the geometry adaptation the subgrid module is required.

I have checked on their fieldtrip-duneuro workshop and they used geometry adapted.

I will double-check with Sophie.

@juangpc
Copy link
Contributor

juangpc commented Apr 22, 2020

Hi,
As we saw yesterday, in order to have the geometry adapted we need to add this subgrid module to the whole compilation process.

I tried yesterday until late to try to have the thing running... and... it was an error after another. the meta-programming kills me man. they auto and template like mad. The module uses boost (a well known computational c++ library) so now you need to install that to in order to compile it. And thee problem is that the include calls are different for gcc, clang, etc... so I'll need a few more sed calls...

I'll keep on trying... but it will take me a few days. I'll try to update soon.

@tmedani
Copy link
Member

tmedani commented Apr 22, 2020

hey Juan,

I know how it's complicated to solve it.

We can submit an issue to Dune/Duneuro git lab and we can have an orientation to solve it.

@juangpc
Copy link
Contributor

juangpc commented Apr 22, 2020

I'm already working on it. Already solved many compilation errors. But more keep popping. do you know if this module is used at all? There are many compilation errors. some could be related to clang... but others I'm not so sure.

@tmedani
Copy link
Member

tmedani commented Apr 22, 2020

no idea at all ...

it's weird since it's not on the dune repo as the others.

I will ask the Germans' team.

@tmedani
Copy link
Member

tmedani commented May 6, 2020

I'm already working on it. Already solved many compilation errors. But more keep popping. do you know if this module is used at all? There are many compilation errors. some could be related to clang... but others I'm not so sure.

@juangpc do you have any updates on this error?

thanks

@chr-engwer
Copy link
Contributor

chr-engwer commented Sep 11, 2020

I tried yesterday until late to try to have the thing running... and... it was an error after another. the meta-programming kills me man. they auto and template like mad. The module uses boost (a well known computational c++ library) so now you need to install that to in order to compile it.

I'm sure it does not use boost.

do you know if this module is used at all?

yes, Carsten (Gräser) is using it on a regular basis and some people here use it also in their duneuro pipeline.

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

4 participants