Recent Posts

Pages: 1 2 [3] 4 5 ... 10
21
DEM / Re: Windows compilation errors with Visual Studio 14 2015 Win64
« Last post by Josep Maria on February 01, 2017, 10:57:52 PM »
Hello,

 Thank you for your prompt solution of the compilation errors. Now they do not appear anymore.
Other ones are still there breaking the compilation.

   See attached file. I think they have a direct relationship with topic:  http://kratos-wiki.cimne.upc.edu/forum/index.php?topic=116.0

Kind Regards

Josep Maria
22
Compilation / Re: Compilation Issue using VS 2015
« Last post by Long on February 01, 2017, 06:39:39 PM »
Hello Pooyan,

I fetched the new code and it works now. Thanks very much.

Best,
Long
23
Compilation / Re: Compilation Issue using VS 2015
« Last post by pooyan on February 01, 2017, 04:42:02 PM »
I have just committed a fix for this error. Please let us know if it works. The problem comes from the fact that VS does not support OpenMP loop with unsigned int.

Bests,

Pooyan.
24
Kratos Core / Re: Serialization of the WeakPointerVector is missing
« Last post by pooyan on February 01, 2017, 04:16:45 PM »
The serialization of the weak pointers is omitted by purpose as it creates cyclic dependency. The idea is that user should regenerate such information (like neighbour nodes) after loading the model and not saving them.

Bests, 
25
Compilation / Compilation Issue using VS 2015
« Last post by Long on February 01, 2017, 01:46:35 PM »
Hi,

I am trying compile Kratos using VS2015.
The configuration I have used are:
- Windows 7
- VS 2015 community
- Python 3.4.3
- Boost 1.59

I successfully configured Kratos without error, which I also checked against the figure shown in the KratosWiki guide page for Windows installation.
After complilation I got 2 errors:

1.

Error   C3016   'i': index variable in OpenMP 'for' statement must have signed integral type   
Project:KratosMeshingApplication
File:   E:\Kratos\kratos\applications\MeshingApplication\custom_utilities\metrics_utility.h   
Line: 273

2.

Error   MSB3073   The command "setlocal
C:\CMake\bin\cmake.exe -DBUILD_TYPE=Release -P cmake_install.cmake
if %errorlevel% neq 0 goto :cmEnd
:cmEnd
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
:cmErrorLevel
exit /b %1
:cmDone
if %errorlevel% neq 0 goto :VCEnd
:VCEnd" exited with code 1.   
Project: INSTALL   
File: C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets   
Line:133

Can you please tell me how to solve this issue?
Thank you.

Long




26
Kratos Core / [SOLVED] Serialization of the WeakPointerVector is missing
« Last post by Josep Maria on January 31, 2017, 04:21:30 PM »
Hello,

    The "restart" file saved / loaded  with the serializer is not working properly because the WeakPointerVector  is not serialized:

Code: [Select]
    template<class TDataType>
    void load(std::string const & rTag, WeakPointerVector<TDataType>& pValue)
    {
        // This is for testing. I have to change it. Pooyan.
        //KRATOS_THROW_ERROR(std::logic_error, "The serialization for weak_ptrs is not implemented yet", "")
//    read(*pValue);
    }
   
    //...................

   template<class TDataType>
    void save(std::string const & rTag, Kratos::WeakPointerVector<TDataType> pValue)
    {
        // This is for testing. I have to implement it. Pooyan.
        //KRATOS_THROW_ERROR(std::logic_error, "The serialization for weak_ptrs is not implemented yet", "")
//    write(*pValue);
    }


Can it be solved, or can you give some guide lines about how implement it correctly ?

Thank you in advance

Josep Maria
27
C++ / Re: Filling Sparse Matrices in Kratos
« Last post by pooyan on January 31, 2017, 10:04:15 AM »
Sparse Matrices are very slow in new allocation. So the way to go is to create a correct graph before filling it. This process consists in allocating the memory for non-zeros in each row of the matrix. you can find an example in ConstructMatrixStructure in the BuilderAndSolvers.

So first you should count nonzeros and create your matrix with

Code: [Select]
SparseMatrixType A_Matrix(100000,100000, number_of_nonzeros); 

Then you should add the your entries in ordered way as you were doing.

28
DEM / Re: Windows compilation errors with Visual Studio 14 2015 Win64
« Last post by Miguel Angel Celigueta on January 31, 2017, 10:04:03 AM »
Hi,
I just removed all typenames from those files. It should be compiling well now.
Please confirm it, because in my Windows 10, 64 bits (VS 2015) these errors were not showing up.
Thanks,
Miguel Ángel
29
DEM / Re: Windows compilation errors with Visual Studio 14 2015 Win64
« Last post by pooyan on January 31, 2017, 09:24:31 AM »
The problem comes from the fact that typename keyword outside of a template class is an error for VS but GCC and CLang neglect it. So the solution is to remove the "typename" keywords giving problem. Meanwhile I have wrote to Miguel Angel to inform him about this issue to avoid it in the future.

Bests,
30
C++ / Filling Sparse Matrices in Kratos
« Last post by DanielB on January 31, 2017, 08:34:26 AM »
Dear all,

I have a given a medium-sized sparse matrix as follows. In the process of factorizing the matrix, I very often need to access and add values to single positions of the matrix (refer to the following code). Now I realize that filling the matrix in such a way becomes very slow the bigger the matrix gets, I guess because I did not specify any sparsity pattern or so. Hence the very general question: What is the most efficient way in Kratos to fill sparse matrices assuming I can not loop just over all lines and columns in a nested form but I need to access entries more or less randomly:

Code: [Select]

typedef UblasSpace<double, CompressedMatrix, Vector> SparseSpaceType;
typedef typename SparseSpaceType::MatrixType SparseMatrixType;

SparseMatrixType A_Matrix;
A_Matrix.resize(100000,100000);
A_Matrix.clear();

for(int some_itr=0; some_itr<some_big_number; some_itr++)
{
for(int i=0; i<some_rows_of_A_Matrix;i++)
{
for(int j=0; j<some_collums_of_A_Matrix;j++)
{
                    A_Matrix(i,j) += some_value;
                }
        }
}

Any advice is appreciated. Thank you very much in advance.

Best regards,
Daniel
Pages: 1 2 [3] 4 5 ... 10