id
int64 0
877k
| file_name
stringlengths 3
109
| file_path
stringlengths 13
185
| content
stringlengths 31
9.38M
| size
int64 31
9.38M
| language
stringclasses 1
value | extension
stringclasses 11
values | total_lines
int64 1
340k
| avg_line_length
float64 2.18
149k
| max_line_length
int64 7
2.22M
| alphanum_fraction
float64 0
1
| repo_name
stringlengths 6
66
| repo_stars
int64 94
47.3k
| repo_forks
int64 0
12k
| repo_open_issues
int64 0
3.4k
| repo_license
stringclasses 11
values | repo_extraction_date
stringclasses 197
values | exact_duplicates_redpajama
bool 2
classes | near_duplicates_redpajama
bool 2
classes | exact_duplicates_githubcode
bool 2
classes | exact_duplicates_stackv2
bool 1
class | exact_duplicates_stackv1
bool 2
classes | near_duplicates_githubcode
bool 2
classes | near_duplicates_stackv1
bool 2
classes | near_duplicates_stackv2
bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1,541,322
|
NoKeyFoundException.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/BSBase/include/bs/base/exceptions/concrete/NoKeyFoundException.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of BS Base Package.
*
* BS Base Package is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* BS Base Package is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef BS_BASE_EXCEPTIONS_NO_KEY_FOUND_EXCEPTION_HPP
#define BS_BASE_EXCEPTIONS_NO_KEY_FOUND_EXCEPTION_HPP
#include <bs/base/exceptions/interface/BaseException.hpp>
#define NO_KEY_FOUND_EXCEPTION() \
NoKeyFoundException(__FILE__, __LINE__, __FUNCTION__)
#define NO_KEY_FOUND_EXCEPTION_WITH_MESSAGE(MESSAGE) \
NoKeyFoundException(__FILE__, __LINE__, __FUNCTION__, MESSAGE)
namespace bs {
namespace base {
namespace exceptions {
class NoKeyFoundException : public BaseException {
public:
NoKeyFoundException(const char *aFileName,
int aLineNumber,
const char *aFunctionName,
const char *aAdditionalInformation = nullptr)
: BaseException("No Key Found Exception: Key provided is not found",
aFileName, aLineNumber, aFunctionName, aAdditionalInformation) {}
};
} //namespace exceptions
} //namespace base
} //namespace bs
#endif //BS_BASE_EXCEPTIONS_NO_KEY_FOUND_EXCEPTION_HPP
| 1,891
|
C++
|
.h
| 41
| 38.463415
| 105
| 0.673181
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,323
|
DirectionException.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/BSBase/include/bs/base/exceptions/concrete/DirectionException.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of BS Base Package.
*
* BS Base Package is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* BS Base Package is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef BS_BASE_EXCEPTIONS_DIRECTION_EXCEPTION_HPP
#define BS_BASE_EXCEPTIONS_DIRECTION_EXCEPTION_HPP
#include <bs/base/exceptions/interface/BaseException.hpp>
#define DIRECTION_EXCEPTION() \
DeviceNotFoundException(__FILE__, __LINE__, __FUNCTION__)
#define DIRECTION_EXCEPTION_WITH_MESSAGE(MESSAGE) \
DeviceNotFoundException(__FILE__, __LINE__, __FUNCTION__, MESSAGE)
namespace bs {
namespace base {
namespace exceptions {
class DirectionException : public BaseException {
public:
DirectionException(const char *aFileName,
int aLineNumber,
const char *aFunctionName,
const char *aAdditionalInformation = nullptr)
: BaseException(
"Direction Exception: Direction is not in range of [0, 1, 2] i.e. Front, Rear, Both.",
aFileName, aLineNumber, aFunctionName, aAdditionalInformation) {}
};
/**
* @brief Checks if the provided direction is within the start, end range.
* @param aDirection[in]
* @return boolean[out]
*/
bool inline is_direction_out_of_range(uint aDirection) {
return aDirection > 2;
}
} //namespace exceptions
} //namespace base
} //namespace bs
#endif //BS_BASE_EXCEPTIONS_DIRECTION_EXCEPTION_HPP
| 2,237
|
C++
|
.h
| 50
| 36.08
| 110
| 0.648301
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,324
|
DeviceNoSpaceException.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/BSBase/include/bs/base/exceptions/concrete/DeviceNoSpaceException.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of BS Base Package.
*
* BS Base Package is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* BS Base Package is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef BS_BASE_EXCEPTIONS_DEVICE_NO_SPACE_EXCEPTION_HPP
#define BS_BASE_EXCEPTIONS_DEVICE_NO_SPACE_EXCEPTION_HPP
#include <bs/base/exceptions/interface/BaseException.hpp>
#define DEVICE_NO_SPACE_EXCEPTION() \
DeviceNoSpaceException(__FILE__, __LINE__, __FUNCTION__)
#define DEVICE_NO_SPACE_EXCEPTION_WITH_MESSAGE(MESSAGE) \
DeviceNoSpaceException(__FILE__, __LINE__, __FUNCTION__, MESSAGE)
namespace bs {
namespace base {
namespace exceptions {
class DeviceNoSpaceException : public BaseException {
public:
DeviceNoSpaceException(const char *aFileName,
int aLineNumber,
const char *aFunctionName,
const char *aAdditionalInformation = nullptr)
: BaseException("\"No Space Exception: No Space left on device.",
aFileName, aLineNumber, aFunctionName, aAdditionalInformation) {}
};
/**
* @brief Checks if there is any device detected
* @return boolean[out]
*/
bool inline no_space_exist(void *space) {
return space == nullptr;
}
} //namespace exceptions
} //namespace base
} //namespace bs
#endif //BS_BASE_EXCEPTIONS_DEVICE_NO_SPACE_EXCEPTION_HPP
| 2,162
|
C++
|
.h
| 48
| 36.270833
| 105
| 0.647673
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,325
|
AxisException.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/BSBase/include/bs/base/exceptions/concrete/AxisException.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of BS Base Package.
*
* BS Base Package is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* BS Base Package is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef BS_BASE_EXCEPTIONS_AXIS_EXCEPTION_HPP
#define BS_BASE_EXCEPTIONS_AXIS_EXCEPTION_HPP
#include <bs/base/exceptions/interface/BaseException.hpp>
#define AXIS_EXCEPTION() \
AxisException(__FILE__, __LINE__, __FUNCTION__)
#define AXIS_EXCEPTION_WITH_MESSAGE(MESSAGE) \
AxisException(__FILE__, __LINE__, __FUNCTION__, MESSAGE)
namespace bs {
namespace base {
namespace exceptions {
class AxisException : public BaseException {
public:
AxisException(const char *aFileName,
int aLineNumber,
const char *aFunctionName,
const char *aAdditionalInformation = nullptr)
: BaseException("Axis Exception: Axis is not in range of [0-2] i.e. x,y,z",
aFileName, aLineNumber, aFunctionName, aAdditionalInformation) {}
};
bool inline is_out_of_range(uint axis) {
return axis > 2;
}
} //namespace exceptions
} //namespace base
} //namespace bs
#endif //BS_BASE_EXCEPTIONS_AXIS_EXCEPTION_HPP
| 1,917
|
C++
|
.h
| 44
| 35.840909
| 105
| 0.657189
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,326
|
IndexOutOfBoundsException.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/BSBase/include/bs/base/exceptions/concrete/IndexOutOfBoundsException.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of BS Base Package.
*
* BS Base Package is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* BS Base Package is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef BS_BASE_EXCEPTIONS_INDEX_OUT_OF_BOUNDS_EXCEPTION_HPP
#define BS_BASE_EXCEPTIONS_INDEX_OUT_OF_BOUNDS_EXCEPTION_HPP
#include <bs/base/exceptions/interface/BaseException.hpp>
#define INDEX_OUT_OF_BOUNDS_EXCEPTION() \
IndexOutOfBoundsException(__FILE__, __LINE__, __FUNCTION__)
#define INDEX_OUT_OF_BOUNDS_EXCEPTION_WITH_MESSAGE(MESSAGE) \
IndexOutOfBoundsException(__FILE__, __LINE__, __FUNCTION__, MESSAGE)
namespace bs {
namespace base {
namespace exceptions {
class IndexOutOfBoundsException : public BaseException {
public:
IndexOutOfBoundsException(const char *aFileName,
int aLineNumber,
const char *aFunctionName,
const char *aAdditionalInformation = nullptr)
: BaseException("Index Out Of Bounds Exception: Provided index is out of your memory access.",
aFileName, aLineNumber, aFunctionName, aAdditionalInformation) {}
};
} //namespace exceptions
} //namespace base
} //namespace bs
#endif //BS_BASE_EXCEPTIONS_INDEX_OUT_OF_BOUNDS_EXCEPTION_HPP
| 1,994
|
C++
|
.h
| 41
| 40.536585
| 118
| 0.676093
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,327
|
NotImplementedException.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/BSBase/include/bs/base/exceptions/concrete/NotImplementedException.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of BS Base Package.
*
* BS Base Package is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* BS Base Package is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef BS_BASE_EXCEPTIONS_NOT_IMPLEMENTED_EXCEPTION_HPP
#define BS_BASE_EXCEPTIONS_NOT_IMPLEMENTED_EXCEPTION_HPP
#include <bs/base/exceptions/interface/BaseException.hpp>
#define NOT_IMPLEMENTED_EXCEPTION() \
NotImplementedException(__FILE__, __LINE__, __FUNCTION__)
#define NOT_IMPLEMENTED_EXCEPTION_WITH_MESSAGE(MESSAGE) \
NotImplementedException(__FILE__, __LINE__, __FUNCTION__, MESSAGE)
namespace bs {
namespace base {
namespace exceptions {
class NotImplementedException : public BaseException {
public:
NotImplementedException(const char *aFileName,
int aLineNumber,
const char *aFunctionName,
const char *aAdditionalInformation = nullptr)
: BaseException("Not Implemented Exception: Function not yet implemented.",
aFileName, aLineNumber, aFunctionName, aAdditionalInformation) {}
};
} //namespace exceptions
} //namespace base
} //namespace bs
#endif //BS_BASE_EXCEPTIONS_NOT_IMPLEMENTED_EXCEPTION_HPP
| 1,941
|
C++
|
.h
| 41
| 39.390244
| 105
| 0.678647
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,328
|
InvalidKeyValueException.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/BSBase/include/bs/base/exceptions/concrete/InvalidKeyValueException.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of BS Base Package.
*
* BS Base Package is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* BS Base Package is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef BS_BASE_EXCEPTIONS_INVALID_KEY_VALUE_EXCEPTION_HPP
#define BS_BASE_EXCEPTIONS_INVALID_KEY_VALUE_EXCEPTION_HPP
#include <bs/base/exceptions/interface/BaseException.hpp>
#define INVALID_KEY_VALUE_EXCEPTION() \
InvalidKeyValueException(__FILE__, __LINE__, __FUNCTION__)
#define INVALID_KEY_VALUE_EXCEPTION_WITH_MESSAGE(MESSAGE) \
InvalidKeyValueException(__FILE__, __LINE__, __FUNCTION__, MESSAGE)
namespace bs {
namespace base {
namespace exceptions {
class InvalidKeyValueException : public BaseException {
public:
InvalidKeyValueException(const char *aFileName,
int aLineNumber,
const char *aFunctionName,
const char *aAdditionalInformation = nullptr)
: BaseException(
"Invalid Key Value Exception: Value provided is not valid for its equivalent key",
aFileName, aLineNumber, aFunctionName, aAdditionalInformation) {}
};
} //namespace exceptions
} //namespace base
} //namespace bs
#endif //BS_BASE_EXCEPTIONS_INVALID_KEY_VALUE_EXCEPTION_HPP
| 1,990
|
C++
|
.h
| 42
| 39.333333
| 106
| 0.675773
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,329
|
UnsupportedFeatureException.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/BSBase/include/bs/base/exceptions/concrete/UnsupportedFeatureException.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of BS Base Package.
*
* BS Base Package is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* BS Base Package is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef BS_BASE_EXCEPTIONS_UNSUPPORTED_FEATURE_EXCEPTION_HPP
#define BS_BASE_EXCEPTIONS_UNSUPPORTED_FEATURE_EXCEPTION_HPP
#include <bs/base/exceptions/interface/BaseException.hpp>
#define UNSUPPORTED_FEATURE_EXCEPTION() \
UnsupportedFeatureException(__FILE__, __LINE__, __FUNCTION__)
#define UNSUPPORTED_FEATURE_EXCEPTION_WITH_MESSAGE(MESSAGE) \
UnsupportedFeatureException(__FILE__, __LINE__, __FUNCTION__, MESSAGE)
namespace bs {
namespace base {
namespace exceptions {
class UnsupportedFeatureException : public BaseException {
public:
UnsupportedFeatureException(const char *aFileName,
int aLineNumber,
const char *aFunctionName,
const char *aAdditionalInformation = nullptr)
: BaseException("Unsupported Feature Exception: Unsupported feature.",
aFileName, aLineNumber, aFunctionName, aAdditionalInformation) {}
};
} //namespace exceptions
} //namespace base
} //namespace bs
#endif //BS_BASE_EXCEPTIONS_UNSUPPORTED_FEATURE_EXCEPTION_HPP
| 1,984
|
C++
|
.h
| 41
| 40.146341
| 105
| 0.68062
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,330
|
DeviceNotFoundException.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/BSBase/include/bs/base/exceptions/concrete/DeviceNotFoundException.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of BS Base Package.
*
* BS Base Package is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* BS Base Package is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef BS_BASE_EXCEPTIONS_DEVICE_NOT_FOUND_EXCEPTION_HPP
#define BS_BASE_EXCEPTIONS_DEVICE_NOT_FOUND_EXCEPTION_HPP
#include <bs/base/exceptions/interface/BaseException.hpp>
#define DEVICE_NOT_FOUND_EXCEPTION() \
DeviceNotFoundException(__FILE__, __LINE__, __FUNCTION__)
#define DEVICE_NOT_FOUND_EXCEPTION_WITH_MESSAGE(MESSAGE) \
DeviceNotFoundException(__FILE__, __LINE__, __FUNCTION__, MESSAGE)
namespace bs {
namespace base {
namespace exceptions {
class DeviceNotFoundException : public BaseException {
public:
DeviceNotFoundException(const char *aFileName,
int aLineNumber,
const char *aFunctionName,
const char *aAdditionalInformation = nullptr)
: BaseException("Device Not Found Exception: No device found.",
aFileName, aLineNumber, aFunctionName, aAdditionalInformation) {}
};
} //namespace exceptions
} //namespace base
} //namespace bs
#endif //BS_BASE_EXCEPTIONS_DEVICE_NOT_FOUND_EXCEPTION_HPP
| 1,934
|
C++
|
.h
| 41
| 39.219512
| 105
| 0.674801
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,331
|
FileNotFoundException.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/BSBase/include/bs/base/exceptions/concrete/FileNotFoundException.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of BS Base Package.
*
* BS Base Package is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* BS Base Package is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef BS_BASE_EXCEPTIONS_FILE_NOT_FOUND_EXCEPTION_HPP
#define BS_BASE_EXCEPTIONS_FILE_NOT_FOUND_EXCEPTION_HPP
#include <bs/base/exceptions/interface/BaseException.hpp>
#define FILE_NOT_FOUND_EXCEPTION() \
FileNotFoundException(__FILE__, __LINE__, __FUNCTION__)
#define FILE_NOT_FOUND_EXCEPTION_WITH_MESSAGE(MESSAGE) \
FileNotFoundException(__FILE__, __LINE__, __FUNCTION__, MESSAGE)
namespace bs {
namespace base {
namespace exceptions {
class FileNotFoundException : public BaseException {
public:
FileNotFoundException(const char *aFileName,
int aLineNumber,
const char *aFunctionName,
const char *aAdditionalInformation = nullptr)
: BaseException("File Not Found Exception: Given path is not found.",
aFileName, aLineNumber, aFunctionName, aAdditionalInformation) {}
};
} //namespace exceptions
} //namespace base
} //namespace bs
#endif //BS_BASE_EXCEPTIONS_FILE_NOT_FOUND_EXCEPTION_HPP
| 1,916
|
C++
|
.h
| 41
| 38.926829
| 105
| 0.673808
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,332
|
IllogicalException.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/BSBase/include/bs/base/exceptions/concrete/IllogicalException.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of BS Base Package.
*
* BS Base Package is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* BS Base Package is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef BS_BASE_EXCEPTIONS_ILLOGICAL_EXCEPTION_HPP
#define BS_BASE_EXCEPTIONS_ILLOGICAL_EXCEPTION_HPP
#include <bs/base/exceptions/interface/BaseException.hpp>
#define ILLOGICAL_EXCEPTION() \
IllogicalException(__FILE__, __LINE__, __FUNCTION__)
#define ILLOGICAL_EXCEPTION_WITH_MESSAGE(MESSAGE) \
IllogicalException(__FILE__, __LINE__, __FUNCTION__, MESSAGE)
namespace bs {
namespace base {
namespace exceptions {
class IllogicalException : public BaseException {
public:
IllogicalException(const char *aFileName,
int aLineNumber,
const char *aFunctionName,
const char *aAdditionalInformation = nullptr)
: BaseException("Illogical Exception: Illogical value provided",
aFileName, aLineNumber, aFunctionName, aAdditionalInformation) {}
};
} //namespace exceptions
} //namespace base
} //namespace bs
#endif //BS_BASE_EXCEPTIONS_ILLOGICAL_EXCEPTION_HPP
| 1,865
|
C++
|
.h
| 41
| 37.902439
| 105
| 0.677863
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,333
|
NullPointerException.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/BSBase/include/bs/base/exceptions/concrete/NullPointerException.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of BS Base Package.
*
* BS Base Package is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* BS Base Package is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef BS_BASE_EXCEPTIONS_NULL_POINTER_EXCEPTION_HPP
#define BS_BASE_EXCEPTIONS_NULL_POINTER_EXCEPTION_HPP
#include <bs/base/exceptions/interface/BaseException.hpp>
#define NULL_POINTER_EXCEPTION() \
NullPointerException(__FILE__, __LINE__, __FUNCTION__)
#define NULL_POINTER_EXCEPTION_WITH_MESSAGE(MESSAGE) \
NullPointerException(__FILE__, __LINE__, __FUNCTION__, MESSAGE)
namespace bs {
namespace base {
namespace exceptions {
class NullPointerException : public BaseException {
public:
NullPointerException(const char *aFileName,
int aLineNumber,
const char *aFunctionName,
const char *aAdditionalInformation = nullptr)
: BaseException("Null Pointer Exception: Pointer returns null.",
aFileName, aLineNumber, aFunctionName, aAdditionalInformation) {}
};
/**
* @brief Checks if the pointer is returned null
* @return boolean[out]
*/
bool inline is_null_ptr(void *pointer) {
return pointer == nullptr;
}
} //namespace exceptions
} //namespace base
} //namespace bs
#endif //BS_BASE_EXCEPTIONS_NULL_POINTER_EXCEPTION_HPP
| 2,133
|
C++
|
.h
| 48
| 35.791667
| 105
| 0.649976
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,334
|
UndefinedException.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/BSBase/include/bs/base/exceptions/concrete/UndefinedException.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of BS Base Package.
*
* BS Base Package is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* BS Base Package is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef BS_BASE_EXCEPTIONS_UNDEFINED_EXCEPTION_HPP
#define BS_BASE_EXCEPTIONS_UNDEFINED_EXCEPTION_HPP
#include <bs/base/exceptions/interface/BaseException.hpp>
#define UNDEFINED_EXCEPTION() \
UndefinedException(__FILE__, __LINE__, __FUNCTION__)
#define UNDEFINED_EXCEPTION_WITH_MESSAGE(MESSAGE) \
UndefinedException(__FILE__, __LINE__, __FUNCTION__, MESSAGE)
namespace bs {
namespace base {
namespace exceptions {
class UndefinedException : public BaseException {
public:
UndefinedException(const char *aFileName,
int aLineNumber,
const char *aFunctionName,
const char *aAdditionalInformation = nullptr)
: BaseException("Undefined Exception: Undefined feature.",
aFileName, aLineNumber, aFunctionName, aAdditionalInformation) {}
};
} //namespace exceptions
} //namespace base
} //namespace bs
#endif //BS_BASE_EXCEPTIONS_UNDEFINED_EXCEPTION_HPP
| 1,860
|
C++
|
.h
| 41
| 37.756098
| 105
| 0.676796
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,335
|
BaseException.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/BSBase/include/bs/base/exceptions/interface/BaseException.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of BS Base Package.
*
* BS Base Package is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* BS Base Package is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef BS_BASE_EXCEPTIONS_BASE_EXCEPTION_HPP
#define BS_BASE_EXCEPTIONS_BASE_EXCEPTION_HPP
#include <iomanip>
#include <sstream>
#include <cstring>
#include <exception>
#define BASE_EXCEPTION(MESSAGE) \
BaseException(MESSAGE, __FILE__, __LINE__, __FUNCTION__)
namespace bs {
namespace base {
namespace exceptions {
class BaseException : public std::exception {
public:
BaseException(const char *aMessage,
const char *aFileName,
int aLineNumber,
const char *aFunctionName,
const char *aAdditionalInformation = nullptr) {
std::stringstream ss;
ss << aMessage << std::endl;
ss << std::left << std::setfill(' ') << std::setw(10) << "File" << ": ";
ss << std::left << std::setfill(' ') << std::setw(10) << aFileName << std::endl;
ss << std::left << std::setfill(' ') << std::setw(10) << "Line" << ": ";
ss << std::left << std::setfill(' ') << std::setw(10) << aLineNumber << std::endl;
ss << std::left << std::setfill(' ') << std::setw(10) << "Function" << ": ";
ss << std::left << std::setfill(' ') << std::setw(10) << aFunctionName << std::endl;
if (aAdditionalInformation != nullptr) {
ss << std::left << std::setfill(' ') << std::setw(10) << "Info" << ": ";
ss << std::left << std::setfill(' ') << std::setw(10) << aAdditionalInformation << std::endl;
}
this->mExceptionMessage = ss.str();
}
const char *
GetExceptionMessage() const noexcept {
return this->mExceptionMessage.c_str();
}
const char *
what() const noexcept override {
return this->GetExceptionMessage();
}
private:
std::string mExceptionMessage;
};
} //namespace exceptions
} //namespace base
} //namespace bs
#endif //BS_BASE_EXCEPTIONS_BASE_EXCEPTION_HPP
| 3,042
|
C++
|
.h
| 65
| 35.384615
| 117
| 0.550827
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,338
|
Components.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/SeismicOperations/include/operations/components/Components.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of SeismicToolbox.
*
* SeismicToolbox is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SeismicToolbox is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPERATIONS_LIB_COMPONENTS_COMPONENTS_HPP
#define OPERATIONS_LIB_COMPONENTS_COMPONENTS_HPP
/// COMPUTATION KERNELS
#include <operations/components/independents/concrete/computation-kernels/isotropic/SecondOrderComputationKernel.hpp>
#include <operations/components/independents/concrete/computation-kernels/isotropic/StaggeredComputationKernel.hpp>
/// MIGRATION ACCOMMODATORS
#include <operations/components/independents/concrete/migration-accommodators/CrossCorrelationKernel.hpp>
/// BOUNDARIES COMPONENTS
#include <operations/components/independents/concrete/boundary-managers/NoBoundaryManager.hpp>
#include <operations/components/independents/concrete/boundary-managers/RandomBoundaryManager.hpp>
#include <operations/components/independents/concrete/boundary-managers/SpongeBoundaryManager.hpp>
#include <operations/components/independents/concrete/boundary-managers/CPMLBoundaryManager.hpp>
#include <operations/components/independents/concrete/boundary-managers/StaggeredCPMLBoundaryManager.hpp>
/// FORWARD COLLECTORS
#include <operations/components/independents/concrete/forward-collectors/ReversePropagation.hpp>
#include <operations/components/independents/concrete/forward-collectors/TwoPropagation.hpp>
/// TRACE MANAGERS
#include <operations/components/independents/concrete/trace-managers/SeismicTraceManager.hpp>
/// SOURCE INJECTORS
#include <operations/components/independents/concrete/source-injectors/RickerSourceInjector.hpp>
/// MEMORY HANDLERS
#include <operations/components/dependents/concrete/memory-handlers/WaveFieldsMemoryHandler.hpp>
/// MODEL HANDLERS
#include <operations/components/independents/concrete/model-handlers/SeismicModelHandler.hpp>
/// TRACE WRITERS
#include <operations/components/independents/concrete/trace-writers/SeismicTraceWriter.hpp>
#endif //OPERATIONS_LIB_COMPONENTS_COMPONENTS_HPP
| 2,617
|
C++
|
.h
| 45
| 56.511111
| 117
| 0.840625
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,339
|
WaveFieldsMemoryHandler.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/SeismicOperations/include/operations/components/dependents/concrete/memory-handlers/WaveFieldsMemoryHandler.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of SeismicToolbox.
*
* SeismicToolbox is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SeismicToolbox is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPERATIONS_LIB_COMPONENTS_MEMORY_HANDLERS_COMPUTATION_KERNELS_MEMORY_HANDLER_HPP
#define OPERATIONS_LIB_COMPONENTS_MEMORY_HANDLERS_COMPUTATION_KERNELS_MEMORY_HANDLER_HPP
#include <operations/components/dependents/primitive/MemoryHandler.hpp>
namespace operations {
namespace components {
class WaveFieldsMemoryHandler : public MemoryHandler {
public:
explicit WaveFieldsMemoryHandler(bs::base::configurations::ConfigurationMap *apConfigurationMap);
~WaveFieldsMemoryHandler() override;
void SetComputationParameters(common::ComputationParameters *apParameters) override;
/**
* @brief Applies first touch initialization by accessing the given pointer in
* the same way it will be accessed in the step function, and initializing the
* values to 0.
*
* @param[in] ptr
* The pointer that will be accessed for the first time.
*
* @param[in] GridBox
* As it contains all the meta data needed
* i.e. nx, ny and nz or wnx, wny and wnz
*
* @param[in] enable_window
* Lets first touch know which sizes to compute upon.
* i.e. Grid size or window size.
*
* @note Access elements in the same way used in the computation kernel step.
*/
void FirstTouch(float *ptr, dataunits::GridBox *apGridBox, bool enable_window = false) override;
/**
* @brief Clone wave fields data from source GridBox to destination one.
* Allocates the wave field in the destination GridBox.
*
* @param[in] _src
* Grid Box to copy from.
*
* @param[in] _dst
* Grid Box to copy to.
*
* @note Cloned wave fields should always be free for preventing
* memory leakage.
*
* @see FreeWaveFields(dataunits:: GridBox *apGridBox)
*/
void CloneWaveFields(dataunits::GridBox *_src, dataunits::GridBox *_dst);
/**
* @brief Copy wave fields data from source GridBox to destination one.
*
* @param[in] _src
* Grid Box to copy from.
*
* @param[in] _dst
* Grid Box to copy to.
*
* @note Both source and destination GridBoxes' wave fields should already
* be allocated.
*/
void CopyWaveFields(dataunits::GridBox *_src, dataunits::GridBox *_dst);
/**
* @param[in] apGridBox
* Grid Box that has the wave fields to be freed.
*
* @see CloneWaveFields(dataunits:: GridBox *src, dataunits:: GridBox *dest)
*/
void FreeWaveFields(dataunits::GridBox *apGridBox);
void AcquireConfiguration() override;
private:
common::ComputationParameters *mpParameters = nullptr;
};
}//namespace components
}//namespace operations
#endif //OPERATIONS_LIB_COMPONENTS_MEMORY_HANDLERS_COMPUTATION_KERNELS_MEMORY_HANDLER_HPP
| 4,025
|
C++
|
.h
| 90
| 34.433333
| 109
| 0.622228
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,340
|
DependentComponent.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/SeismicOperations/include/operations/components/dependents/interface/DependentComponent.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of SeismicToolbox.
*
* SeismicToolbox is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SeismicToolbox is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPERATIONS_LIB_COMPONENTS_DEPENDENT_COMPONENT_HPP
#define OPERATIONS_LIB_COMPONENTS_DEPENDENT_COMPONENT_HPP
#include <bs/base/configurations/interface/Configurable.hpp>
#include <operations/common/ComputationParameters.hpp>
namespace operations {
namespace components {
/**
* @brief Dependent Component interface. All Dependent Component
* in the Seismic Framework needs to extend it.
*
* @note Each engine comes with it's own Timer and Logger. Logger
* Channel should be initialized at each concrete implementation
* and should be destructed at each destructor.
*/
class DependentComponent : public bs::base::configurations::Configurable {
public:
/**
* @brief Destructors should be overridden to ensure correct memory management.
*/
virtual ~DependentComponent() = default;
/**
* @brief Sets the computation parameters to be used for the component.
*
* @param[in] apParameters
* Parameters of the simulation independent from the grid.
*/
virtual void SetComputationParameters(common::ComputationParameters *apParameters) = 0;
protected:
/// Configurations Map
bs::base::configurations::ConfigurationMap *mpConfigurationMap;
};
}//namespace components
}//namespace operations
#endif //OPERATIONS_LIB_COMPONENTS_DEPENDENT_COMPONENT_HPP
| 2,283
|
C++
|
.h
| 52
| 37.173077
| 99
| 0.70054
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,341
|
MemoryHandler.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/SeismicOperations/include/operations/components/dependents/primitive/MemoryHandler.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of SeismicToolbox.
*
* SeismicToolbox is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SeismicToolbox is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPERATIONS_LIB_COMPONENTS_MEMORY_HANDLER_HPP
#define OPERATIONS_LIB_COMPONENTS_MEMORY_HANDLER_HPP
#include <operations/components/independents/interface/Component.hpp>
#include <operations/common/DataTypes.h>
namespace operations {
namespace components {
class MemoryHandler : public DependentComponent {
public:
/**
* @brief Destructors should be overridden to ensure correct memory management.
*/
virtual ~MemoryHandler() {};
/**
* @brief Applies first touch initialization by accessing the given pointer in
* the same way it will be accessed in the step function, and initializing the
* values to 0.
*
* @param[in] ptr
* The pointer that will be accessed for the first time.
*
* @param[in] apGridBox
* As it contains all the meta data needed
* i.e. nx, ny and nz or wnx, wny and wnz
*
* @param[in] enable_window
* Lets first touch know which sizes to compute upon.
* i.e. Grid size or window size.
*/
virtual void FirstTouch(float *ptr, dataunits::GridBox *apGridBox, bool enable_window = false) = 0;
};
}//namespace components
}//namespace operations
#endif //OPERATIONS_LIB_COMPONENTS_MEMORY_HANDLER_HPP
| 2,183
|
C++
|
.h
| 51
| 35.431373
| 111
| 0.667765
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,342
|
HasDependents.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/SeismicOperations/include/operations/components/dependency/concrete/HasDependents.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of SeismicToolbox.
*
* SeismicToolbox is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SeismicToolbox is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPERATIONS_LIB_COMPONENTS_HAS_DEPENDENTS_HPP
#define OPERATIONS_LIB_COMPONENTS_HAS_DEPENDENTS_HPP
#include <cstdlib>
#include <bs/base/logger/concrete/LoggerSystem.hpp>
#include <operations/components/dependency/interface/Dependency.hpp>
#include <operations/components/dependency/helpers/ComponentsMap.tpp>
#include <operations/components/dependents/interface/DependentComponent.hpp>
#include <operations/common/ComputationParameters.hpp>
namespace operations {
namespace components {
namespace dependency {
/**
* @brief Has Dependents Component interface. All Independent Component
* in the Seismic Framework needs to extend it in case they need a
* dependent component.
*
* @relatedalso class HasNoDependents
*
* @note
*/
class HasDependents : virtual public Dependency {
public:
/**
* @brief Destructors should be overridden to ensure correct memory management.
*/
virtual ~HasDependents() = default;
/**
* @brief Sets the Dependent Components to use later on.
*
* @param[in] apDependentComponentsMap
* The designated Dependent Components to run operations on.
*
* @note Only components that need Dependent Components should
* override this function.
*/
virtual void SetDependentComponents(
operations::helpers::ComponentsMap<DependentComponent> *apDependentComponentsMap) {
bs::base::logger::LoggerSystem *Logger = bs::base::logger::LoggerSystem::GetInstance();
this->mpDependentComponentsMap = apDependentComponentsMap;
if (this->mpDependentComponentsMap == nullptr) {
Logger->Error() << "No Dependent Components Map provided... "
<< "Terminating..." << '\n';
exit(EXIT_FAILURE);
}
}
/**
* @brief Dependent Components Map getter.
* @return[out] DependentComponentsMap *
*/
inline operations::helpers::ComponentsMap<DependentComponent> *
GetDependentComponentsMap() const {
return this->mpDependentComponentsMap;
}
private:
/// Dependent Components Map
operations::helpers::ComponentsMap<DependentComponent> *mpDependentComponentsMap;
};
}//namespace dependency
}//namespace components
}//namespace operations
#endif //OPERATIONS_LIB_COMPONENTS_HAS_DEPENDENTS_HPP
| 3,643
|
C++
|
.h
| 79
| 34.670886
| 107
| 0.62201
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,343
|
HasNoDependents.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/SeismicOperations/include/operations/components/dependency/concrete/HasNoDependents.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of SeismicToolbox.
*
* SeismicToolbox is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SeismicToolbox is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPERATIONS_LIB_COMPONENTS_HAS_NO_DEPENDENTS_HPP
#define OPERATIONS_LIB_COMPONENTS_HAS_NO_DEPENDENTS_HPP
#include "operations/components/dependency/interface/Dependency.hpp"
#include "operations/components/dependency/helpers/ComponentsMap.tpp"
#include "operations/common/ComputationParameters.hpp"
namespace operations {
namespace components {
namespace dependency {
/**
* @brief Has Dependents Component interface. All Independent Component
* in the Seismic Framework needs to extend it in case they does not need a
* dependent component.
*
* @relatedalso class HasDependents
*/
class HasNoDependents : virtual public Dependency {
public:
/**
* @brief Destructors should be overridden to ensure correct memory management.
*/
~HasNoDependents() override = default;
/**
* @brief Sets the Dependent Components to use later on.
*
* @param[in] apDependentComponentsMap
* The designated Dependent Components to run operations on.
*
* @note Dummy implementation.
*/
void SetDependentComponents(
operations::helpers::ComponentsMap<DependentComponent> *apDependentComponentsMap) override {};
};
}//namespace dependency
}//namespace components
}//namespace operations
#endif //OPERATIONS_LIB_COMPONENTS_HAS_NO_DEPENDENTS_HPP
| 2,379
|
C++
|
.h
| 54
| 35.388889
| 118
| 0.666235
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,344
|
Dependency.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/SeismicOperations/include/operations/components/dependency/interface/Dependency.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of SeismicToolbox.
*
* SeismicToolbox is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SeismicToolbox is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPERATIONS_LIB_COMPONENTS_DEPENDENCY_HPP
#define OPERATIONS_LIB_COMPONENTS_DEPENDENCY_HPP
#include "operations/components/dependency/helpers/ComponentsMap.tpp"
namespace operations {
namespace components {
namespace dependency {
class Dependency {
public:
/**
* @brief Destructors should be overridden to ensure correct memory management.
*/
virtual ~Dependency() = default;
/**
* @brief Sets the Dependent Components to use later on.
*
* @param[in] apDependentComponentsMap
* The designated Dependent Components to run operations on.
*
* @note Only components that need Dependent Components should
* override this function.
*/
virtual void SetDependentComponents(
operations::helpers::ComponentsMap<DependentComponent> *apDependentComponentsMap) = 0;
};
}//namespace dependency
}//namespace components
}//namespace operations
#endif //OPERATIONS_LIB_COMPONENTS_DEPENDENCY_HPP
| 1,967
|
C++
|
.h
| 46
| 34.347826
| 110
| 0.665274
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,345
|
CrossCorrelationKernel.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/SeismicOperations/include/operations/components/independents/concrete/migration-accommodators/CrossCorrelationKernel.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of SeismicToolbox.
*
* SeismicToolbox is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SeismicToolbox is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPERATIONS_LIB_COMPONENTS_MIGRATION_ACCOMMODATORS_CROSS_CORRELATION_KERNEL_HPP
#define OPERATIONS_LIB_COMPONENTS_MIGRATION_ACCOMMODATORS_CROSS_CORRELATION_KERNEL_HPP
#include <operations/components/independents/primitive/MigrationAccommodator.hpp>
#include <operations/components/dependency/concrete/HasNoDependents.hpp>
namespace operations {
namespace components {
class CrossCorrelationKernel : public MigrationAccommodator,
public dependency::HasNoDependents {
public:
explicit CrossCorrelationKernel(bs::base::configurations::ConfigurationMap *apConfigurationMap);
~CrossCorrelationKernel() override;
void SetComputationParameters(common::ComputationParameters *apParameters) override;
void SetGridBox(dataunits::GridBox *apGridBox) override;
void SetCompensation(COMPENSATION_TYPE aCOMPENSATION_TYPE) override;
void Stack() override;
void Correlate(dataunits::DataUnit *apDataUnit) override;
void ResetShotCorrelation() override;
dataunits::FrameBuffer<float> *GetShotCorrelation() override;
dataunits::FrameBuffer<float> *GetStackedShotCorrelation() override;
dataunits::MigrationData *GetMigrationData() override;
void AcquireConfiguration() override;
void SetSourcePoint(Point3D *apSourcePoint) override;
private:
uint CalculateDipAngleDepth(double aDipAngle, int aCurrentPositionX,
int aCurrentPositionY) const;
void InitializeInternalElements();
template<bool _IS_2D, COMPENSATION_TYPE _COMPENSATION_TYPE>
void Correlation(dataunits::GridBox *apGridBox);
template<bool _IS_2D, COMPENSATION_TYPE _COMPENSATION_TYPE>
void Stack();
private:
common::ComputationParameters *mpParameters = nullptr;
dataunits::GridBox *mpGridBox = nullptr;
Point3D mSourcePoint{};
COMPENSATION_TYPE mCompensationType;
dataunits::FrameBuffer<float> *mpShotCorrelation = nullptr;
dataunits::FrameBuffer<float> *mpSourceIllumination = nullptr;
dataunits::FrameBuffer<float> *mpReceiverIllumination = nullptr;
dataunits::FrameBuffer<float> *mpTotalCorrelation = nullptr;
};
}//namespace components
}//namespace operations
#endif // OPERATIONS_LIB_COMPONENTS_MIGRATION_ACCOMMODATORS_CROSS_CORRELATION_KERNEL_HPP
| 3,339
|
C++
|
.h
| 61
| 45.622951
| 108
| 0.716703
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,346
|
SeismicTraceWriter.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/SeismicOperations/include/operations/components/independents/concrete/trace-writers/SeismicTraceWriter.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of SeismicToolbox.
*
* SeismicToolbox is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SeismicToolbox is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPERATIONS_LIB_COMPONENTS_TRACE_WRITERS_SEISMIC_TRACE_WRITER_HPP
#define OPERATIONS_LIB_COMPONENTS_TRACE_WRITERS_SEISMIC_TRACE_WRITER_HPP
#include <bs/io/api/cpp/BSIO.hpp>
#include <operations/components/independents/primitive/TraceWriter.hpp>
#include <operations/components/dependency/concrete/HasNoDependents.hpp>
namespace operations {
namespace components {
class SeismicTraceWriter : public TraceWriter, public dependency::HasNoDependents {
public:
explicit SeismicTraceWriter(bs::base::configurations::ConfigurationMap *apConfigurationMap);
~SeismicTraceWriter() override;
void StartRecordingInstance(
operations::dataunits::TracesHolder &aTracesHolder) override;
void RecordTrace(uint time_step) override;
void FinishRecordingInstance(uint shot_id) override;
void Finalize() override;
void SetComputationParameters(common::ComputationParameters *apParameters) override;
void SetGridBox(dataunits::GridBox *apGridBox) override;
void AcquireConfiguration() override;
private:
common::ComputationParameters *mpParameters = nullptr;
dataunits::GridBox *mpGridBox = nullptr;
uint mSampleNumber;
uint mTraceNumber;
float mTraceSampling;
dataunits::FrameBuffer<float> mpDTraces;
dataunits::FrameBuffer<uint> mpDPositionsY;
dataunits::FrameBuffer<uint> mpDPositionsX;
bs::io::streams::Writer *mpSeismicWriter = nullptr;
};
}//namespace components
}//namespace operations
#endif // OPERATIONS_LIB_COMPONENTS_TRACE_WRITERS_SEISMIC_TRACE_WRITER_HPP
| 2,511
|
C++
|
.h
| 51
| 42.039216
| 104
| 0.727944
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,347
|
TwoPropagation.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/SeismicOperations/include/operations/components/independents/concrete/forward-collectors/TwoPropagation.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of SeismicToolbox.
*
* SeismicToolbox is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SeismicToolbox is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPERATIONS_LIB_COMPONENTS_FORWARD_COLLECTORS_TWO_PROPAGATION_HPP
#define OPERATIONS_LIB_COMPONENTS_FORWARD_COLLECTORS_TWO_PROPAGATION_HPP
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <sstream>
#include <unistd.h>
#include <bs/base/memory/MemoryManager.hpp>
#include <operations/components/independents/concrete/forward-collectors/file-handler/file_handler.h>
#include <operations/components/dependents/concrete/memory-handlers/WaveFieldsMemoryHandler.hpp>
#include <operations/components/independents/primitive/ForwardCollector.hpp>
#include <operations/components/dependency/concrete/HasDependents.hpp>
namespace operations {
namespace components {
class TwoPropagation : public ForwardCollector,
public dependency::HasDependents {
public:
explicit TwoPropagation(bs::base::configurations::ConfigurationMap *apConfigurationMap);
~TwoPropagation() override;
void SetComputationParameters(common::ComputationParameters *apParameters) override;
void SetGridBox(dataunits::GridBox *apGridBox) override;
void SetDependentComponents(
operations::helpers::ComponentsMap<DependentComponent> *apDependentComponentsMap) override;
void FetchForward() override;
void SaveForward() override;
void ResetGrid(bool aIsForwardRun) override;
dataunits::GridBox *GetForwardGrid() override;
void AcquireConfiguration() override;
private:
common::ComputationParameters *mpParameters = nullptr;
dataunits::GridBox *mpMainGridBox = nullptr;
dataunits::GridBox *mpInternalGridBox = nullptr;
WaveFieldsMemoryHandler *mpWaveFieldsMemoryHandler = nullptr;
dataunits::FrameBuffer<float> *mpForwardPressure = nullptr;
float *mpForwardPressureHostMemory = nullptr;
float *mpTempPrev = nullptr;
float *mpTempCurr = nullptr;
float *mpTempNext = nullptr;
bool mIsMemoryFit;
uint mTimeCounter;
unsigned long long mMaxNT;
unsigned long long mMaxDeviceNT;
unsigned int mpMaxNTRatio;
std::string mWritePath;
bool mIsCompression;
/* ZFP Properties. */
int mZFP_Parallel;
bool mZFP_IsRelative;
float mZFP_Tolerance;
};
}//namespace components
}//namespace operations
#endif //OPERATIONS_LIB_COMPONENTS_FORWARD_COLLECTORS_TWO_PROPAGATION_HPP
| 3,378
|
C++
|
.h
| 71
| 39.464789
| 111
| 0.714067
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,348
|
ReversePropagation.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/SeismicOperations/include/operations/components/independents/concrete/forward-collectors/ReversePropagation.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of SeismicToolbox.
*
* SeismicToolbox is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SeismicToolbox is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPERATIONS_LIB_COMPONENTS_FORWARD_COLLECTORS_REVERSE_PROPAGATION_HPP
#define OPERATIONS_LIB_COMPONENTS_FORWARD_COLLECTORS_REVERSE_PROPAGATION_HPP
#include <cstdlib>
#include <cstring>
#include <bs/base/memory/MemoryManager.hpp>
#include <operations/components/dependents/concrete/memory-handlers/WaveFieldsMemoryHandler.hpp>
#include <operations/components/independents/primitive/ForwardCollector.hpp>
#include <operations/components/dependency/concrete/HasDependents.hpp>
#include <operations/components/independents/primitive/ComputationKernel.hpp>
#include <operations/components/independents/concrete/forward-collectors/boundary-saver/BoundarySaver.h>
namespace operations {
namespace components {
class ReversePropagation : public ForwardCollector,
public dependency::HasDependents {
public:
explicit ReversePropagation(bs::base::configurations::ConfigurationMap *apConfigurationMap);
~ReversePropagation() override;
void SetComputationParameters(common::ComputationParameters *apParameters) override;
void SetGridBox(dataunits::GridBox *apGridBox) override;
void SetDependentComponents(
operations::helpers::ComponentsMap<DependentComponent> *apDependentComponentsMap) override;
void FetchForward() override;
void SaveForward() override;
void ResetGrid(bool is_forward_run) override;
dataunits::GridBox *GetForwardGrid() override;
void AcquireConfiguration() override;
private:
/**
* @brief Used by reverse injection propagation mode.
*/
void Inject();
private:
common::ComputationParameters *mpParameters = nullptr;
ComputationKernel *mpComputationKernel = nullptr;
WaveFieldsMemoryHandler *mpWaveFieldsMemoryHandler = nullptr;
/*
* Propagation Properties.
*/
dataunits::GridBox *mpMainGridBox = nullptr;
dataunits::GridBox *mpInternalGridBox = nullptr;
/*
* Injection Properties.
*/
bool mInjectionEnabled;
std::vector<components::helpers::BoundarySaver *> mBoundarySavers;
uint mTimeStep;
};
}//namespace components
}//namespace operations
#endif //OPERATIONS_LIB_COMPONENTS_FORWARD_COLLECTORS_REVERSE_PROPAGATION_HPP
| 3,265
|
C++
|
.h
| 68
| 39.823529
| 111
| 0.712303
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,349
|
BoundarySaver.h
|
brightskiesinc_Reverse_Time_Migration/libs/SeismicOperations/include/operations/components/independents/concrete/forward-collectors/boundary-saver/BoundarySaver.h
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of SeismicToolbox.
*
* SeismicToolbox is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SeismicToolbox is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPERATIONS_LIB_COMPONENTS_FORWARD_COLLECTORS_BOUNDARY_SAVER_H
#define OPERATIONS_LIB_COMPONENTS_FORWARD_COLLECTORS_BOUNDARY_SAVER_H
#include <operations/common/ComputationParameters.hpp>
#include <operations/data-units/concrete/holders/GridBox.hpp>
#include <operations/components/independents/interface/Component.hpp>
namespace operations {
namespace components {
namespace helpers {
/**
* @brief
* Boundary saving helper class
* Used for the storage, and restoration of
* boundaries.
*/
class BoundarySaver {
public:
/**
* @brief
* Default constructor.
*/
BoundarySaver();
/**
* @brief
* Initialize the boundary saver to target a specific wave field.
*
* @param[in] aActiveKey
* The key of the wave field to store.
*
* @param[in] apInternalGridBox
* The internal gridbox used for the restoration process.
*
* @param[in] apMainGridBox
* The main gridbox of the system, used for saving process.
*
* @param[in] apParameters
* The computation parameters.
*/
void Initialize(dataunits::GridBox::Key aActiveKey,
dataunits::GridBox *apInternalGridBox,
dataunits::GridBox *apMainGridBox,
common::ComputationParameters *apParameters);
/**
* @brief
* The current time step to be stored.
*
* @param[in] aStep
* The time step to be stored.
*/
void SaveBoundaries(uint aStep);
/**
* @brief
* The current time step to be restored.
*
* @param[in] aStep
* The time step to be restored.
*/
void RestoreBoundaries(uint aStep);
/**
* @brief
* Default destructor.
*/
~BoundarySaver();
private:
/// The key to save on the boundaries.
dataunits::GridBox::Key mKey;
/// The saved boundaries.
dataunits::FrameBuffer<float> mBackupBoundaries;
/// The boundary size saved in a single time step.
uint mBoundarySize;
/// Internal Gridbox used for the restoration process.
dataunits::GridBox *mpInternalGridBox;
/// Main Gridbox used for the restoration process.
dataunits::GridBox *mpMainGridBox;
/// The computation parameters used for calculations.
common::ComputationParameters *mpComputationParameters;
};
}//namespace helpers
}//namespace components
}//namespace operations
#endif // OPERATIONS_LIB_COMPONENTS_FORWARD_COLLECTORS_BOUNDARY_SAVER_H
| 4,058
|
C++
|
.h
| 98
| 28.326531
| 81
| 0.557327
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,350
|
file_handler.h
|
brightskiesinc_Reverse_Time_Migration/libs/SeismicOperations/include/operations/components/independents/concrete/forward-collectors/file-handler/file_handler.h
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of SeismicToolbox.
*
* SeismicToolbox is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SeismicToolbox is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPERATIONS_LIB_COMPONENTS_FORWARD_COLLECTORS_FILE_HANDLER_H
#define OPERATIONS_LIB_COMPONENTS_FORWARD_COLLECTORS_FILE_HANDLER_H
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <sstream>
#include <unistd.h>
namespace operations {
namespace components {
namespace helpers {
void bin_file_save(const char *file_name, const float *data, const size_t &size);
void bin_file_load(const char *file_name, float *data, const size_t &size);
}//namespace helpers
}//namespace components
}//namespace operations
#endif //OPERATIONS_LIB_COMPONENTS_FORWARD_COLLECTORS_FILE_HANDLER_H
| 1,407
|
C++
|
.h
| 34
| 38.264706
| 93
| 0.754758
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,351
|
SeismicTraceManager.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/SeismicOperations/include/operations/components/independents/concrete/trace-managers/SeismicTraceManager.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of SeismicToolbox.
*
* SeismicToolbox is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SeismicToolbox is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPERATIONS_LIB_COMPONENTS_TRACE_MANAGERS_SEISMIC_TRACE_MANAGER_HPP
#define OPERATIONS_LIB_COMPONENTS_TRACE_MANAGERS_SEISMIC_TRACE_MANAGER_HPP
#include <fstream>
#include <unordered_map>
#include <bs/io/api/cpp/BSIO.hpp>
#include <operations/components/independents/primitive/TraceManager.hpp>
#include <operations/components/dependency/concrete/HasNoDependents.hpp>
#include <operations/data-units/concrete/holders/FrameBuffer.hpp>
namespace operations {
namespace components {
class SeismicTraceManager : public TraceManager,
public dependency::HasNoDependents {
public:
SeismicTraceManager(bs::base::configurations::ConfigurationMap *apConfigurationMap);
~SeismicTraceManager() override;
void SetComputationParameters(common::ComputationParameters *apParameters) override;
void SetGridBox(dataunits::GridBox *apGridBox) override;
void ReadShot(std::vector<std::string> file_names, uint shot_number,
std::string sort_key) override;
void PreprocessShot() override;
void ApplyTraces(int time_step) override;
void ApplyIsotropicField() override;
void RevertIsotropicField() override;
dataunits::TracesHolder *GetTracesHolder() override;
Point3D *GetSourcePoint() override;
std::vector<uint> GetWorkingShots(std::vector<std::string> file_names,
uint min_shot, uint max_shot, std::string type) override;
void AcquireConfiguration() override;
private:
common::ComputationParameters *mpParameters = nullptr;
dataunits::GridBox *mpGridBox = nullptr;
Point3D mpSourcePoint;
bs::io::streams::Reader *mpSeismicReader = nullptr;
INTERPOLATION mInterpolation;
dataunits::TracesHolder *mpTracesHolder = nullptr;
dataunits::FrameBuffer<float> mpDTraces;
dataunits::FrameBuffer<uint> mpDPositionsY;
dataunits::FrameBuffer<uint> mpDPositionsX;
float mTotalTime;
int mShotStride;
};
}//namespace components
}//namespace operations
#endif // OPERATIONS_LIB_COMPONENTS_TRACE_MANAGERS_SEISMIC_TRACE_MANAGER_HPP
| 3,125
|
C++
|
.h
| 62
| 41.580645
| 103
| 0.700759
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,352
|
RickerSourceInjector.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/SeismicOperations/include/operations/components/independents/concrete/source-injectors/RickerSourceInjector.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of SeismicToolbox.
*
* SeismicToolbox is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SeismicToolbox is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPERATIONS_LIB_COMPONENTS_SOURCE_INJECTORS_RICKER_SOURCE_INJECTOR_HPP
#define OPERATIONS_LIB_COMPONENTS_SOURCE_INJECTORS_RICKER_SOURCE_INJECTOR_HPP
#include <operations/components/independents/primitive/SourceInjector.hpp>
#include <operations/components/dependency/concrete/HasNoDependents.hpp>
namespace operations {
namespace components {
class RickerSourceInjector : public SourceInjector, public dependency::HasNoDependents {
public:
explicit RickerSourceInjector(bs::base::configurations::ConfigurationMap *apConfigurationMap);
~RickerSourceInjector() override;
void ApplySource(int time_step) override;
void ApplyIsotropicField() override;
void RevertIsotropicField() override;
int GetCutOffTimeStep() override;
int GetPrePropagationNT() override;
float GetMaxFrequency() override;
void SetComputationParameters(common::ComputationParameters *apParameters) override;
void SetGridBox(dataunits::GridBox *apGridBox) override;
void SetSourcePoint(Point3D *apSourcePoint) override;
void AcquireConfiguration() override;
private:
uint GetInjectionLocation();
private:
common::ComputationParameters *mpParameters = nullptr;
dataunits::GridBox *mpGridBox = nullptr;
Point3D *mpSourcePoint = nullptr;
float mMaxFrequencyAmplitudePercentage;
float mMaxFrequency;
};
}//namespace components
}//namespace operations
#endif // OPERATIONS_LIB_COMPONENTS_SOURCE_INJECTORS_RICKER_SOURCE_INJECTOR_HPP
| 2,443
|
C++
|
.h
| 50
| 41.82
| 106
| 0.734401
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,353
|
SeismicModelHandler.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/SeismicOperations/include/operations/components/independents/concrete/model-handlers/SeismicModelHandler.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of SeismicToolbox.
*
* SeismicToolbox is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SeismicToolbox is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPERATIONS_LIB_COMPONENTS_MODEL_HANDLER_SEISMIC_MODEL_HANDLER_HPP
#define OPERATIONS_LIB_COMPONENTS_MODEL_HANDLER_SEISMIC_MODEL_HANDLER_HPP
#include <map>
#include <bs/base/memory/MemoryManager.hpp>
#include <operations/components/dependents/concrete/memory-handlers/WaveFieldsMemoryHandler.hpp>
#include <operations/components/independents/primitive/ModelHandler.hpp>
#include <operations/components/dependency/concrete/HasDependents.hpp>
namespace operations {
namespace components {
class SeismicModelHandler : public ModelHandler, public dependency::HasDependents {
public:
explicit SeismicModelHandler(bs::base::configurations::ConfigurationMap *apConfigurationMap);
~SeismicModelHandler() override;
void SetComputationParameters(common::ComputationParameters *apParameters) override;
void SetGridBox(dataunits::GridBox *apGridBox) override;
void SetDependentComponents(
operations::helpers::ComponentsMap<DependentComponent> *apDependentComponentsMap) override;
dataunits::GridBox *ReadModel(std::map<std::string, std::string> file_names) override;
void SetupWindow() override;
void AcquireConfiguration() override;
void PostProcessMigration(dataunits::MigrationData *apMigrationData) override;
private:
float GetSuitableDT(float *coefficients, std::map<std::string, float> maximums,
int half_length, float dt_relax);
void Initialize(std::map<std::string, std::string> file_names);
void RegisterWaveFields(uint nx, uint ny, uint nz);
void RegisterParameters(uint nx, uint ny, uint nz);
void SetupPadding();
void AllocateWaveFields();
void AllocateParameters();
private:
common::ComputationParameters *mpParameters = nullptr;
dataunits::GridBox *mpGridBox = nullptr;
WaveFieldsMemoryHandler *mpWaveFieldsMemoryHandler = nullptr;
std::vector<std::pair<dataunits::GridBox::Key, std::string>> PARAMS_NAMES;
std::vector<dataunits::GridBox::Key> WAVE_FIELDS_NAMES;
std::string mReaderType;
float mDepthSamplingScaler;
};
}//namespace components
}//namespace operations
#endif //OPERATIONS_LIB_COMPONENTS_MODEL_HANDLER_SEISMIC_MODEL_HANDLER_HPP
| 3,216
|
C++
|
.h
| 60
| 45.55
| 111
| 0.72009
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,354
|
BaseComputationHelpers.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/SeismicOperations/include/operations/components/independents/concrete/computation-kernels/BaseComputationHelpers.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of SeismicToolbox.
*
* SeismicToolbox is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SeismicToolbox is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPERATIONS_LIB_COMPONENTS_COMPUTATION_KERNELS_BASE_COMPUTATION_HELPERS_HPP
#define OPERATIONS_LIB_COMPONENTS_COMPUTATION_KERNELS_BASE_COMPUTATION_HELPERS_HPP
#ifndef fma
#define fma(a, b, c) ((a) * (b) + (c))
#endif
/**
* Computation kernels forward declarations utilities.
*/
#define FORWARD_DECLARE_COMPUTE_TEMP_3(CLASS, FUNCTION, KERNEL_TYPE, IS_2D) \
template void CLASS::FUNCTION<KERNEL_TYPE, IS_2D, O_2>(); \
template void CLASS::FUNCTION<KERNEL_TYPE, IS_2D, O_4>(); \
template void CLASS::FUNCTION<KERNEL_TYPE, IS_2D, O_8>(); \
template void CLASS::FUNCTION<KERNEL_TYPE, IS_2D, O_12>(); \
template void CLASS::FUNCTION<KERNEL_TYPE, IS_2D, O_16>();
#define FORWARD_DECLARE_COMPUTE_TEMP_2(CLASS, FUNCTION, KERNEL_TYPE) \
FORWARD_DECLARE_COMPUTE_TEMP_3(CLASS, FUNCTION, KERNEL_TYPE, true) \
FORWARD_DECLARE_COMPUTE_TEMP_3(CLASS, FUNCTION, KERNEL_TYPE, false)
#define FORWARD_DECLARE_COMPUTE_TEMPLATE(CLASS, FUNCTION) \
FORWARD_DECLARE_COMPUTE_TEMP_2(CLASS, FUNCTION, KERNEL_MODE::FORWARD) \
FORWARD_DECLARE_COMPUTE_TEMP_2(CLASS, FUNCTION, KERNEL_MODE::INVERSE) \
FORWARD_DECLARE_COMPUTE_TEMP_2(CLASS, FUNCTION, KERNEL_MODE::ADJOINT)
/**
* Boundary managers forward declaration utilities.
*/
#define FORWARD_DECLARE_BOUND_TEMP_3(FUNCTION, KERNEL_TYPE, AXIS, OPPOSITE) \
template void FUNCTION<KERNEL_TYPE, AXIS, OPPOSITE, O_2>(); \
template void FUNCTION<KERNEL_TYPE, AXIS, OPPOSITE, O_4>(); \
template void FUNCTION<KERNEL_TYPE, AXIS, OPPOSITE, O_8>(); \
template void FUNCTION<KERNEL_TYPE, AXIS, OPPOSITE, O_12>(); \
template void FUNCTION<KERNEL_TYPE, AXIS, OPPOSITE, O_16>();
#define FORWARD_DECLARE_BOUND_TEMP_2(FUNCTION, KERNEL_TYPE, AXIS) \
FORWARD_DECLARE_BOUND_TEMP_3(FUNCTION, KERNEL_TYPE, AXIS, false) \
FORWARD_DECLARE_BOUND_TEMP_3(FUNCTION, KERNEL_TYPE, AXIS, true)
#define FORWARD_DECLARE_BOUND_TEMP_1(FUNCTION, KERNEL_TYPE) \
FORWARD_DECLARE_BOUND_TEMP_2(FUNCTION, KERNEL_TYPE, X_AXIS) \
FORWARD_DECLARE_BOUND_TEMP_2(FUNCTION, KERNEL_TYPE, Z_AXIS) \
FORWARD_DECLARE_BOUND_TEMP_2(FUNCTION, KERNEL_TYPE, Y_AXIS)
#define FORWARD_DECLARE_BOUND_TEMPLATE(FUNCTION) \
FORWARD_DECLARE_BOUND_TEMP_1(FUNCTION, true) \
FORWARD_DECLARE_BOUND_TEMP_1(FUNCTION, false)
#define FORWARD_DECLARE_SINGLE_BOUND_TEMP_3(FUNCTION, AXIS, OPPOSITE) \
template void FUNCTION<AXIS, OPPOSITE, O_2>(); \
template void FUNCTION<AXIS, OPPOSITE, O_4>(); \
template void FUNCTION<AXIS, OPPOSITE, O_8>(); \
template void FUNCTION<AXIS, OPPOSITE, O_12>(); \
template void FUNCTION<AXIS, OPPOSITE, O_16>();
#define FORWARD_DECLARE_SINGLE_BOUND_TEMP_2(FUNCTION, AXIS) \
FORWARD_DECLARE_SINGLE_BOUND_TEMP_3(FUNCTION, AXIS, false) \
FORWARD_DECLARE_SINGLE_BOUND_TEMP_3(FUNCTION, AXIS, true)
#define FORWARD_DECLARE_SINGLE_BOUND_TEMPLATE(FUNCTION) \
FORWARD_DECLARE_SINGLE_BOUND_TEMP_2(FUNCTION, X_AXIS) \
FORWARD_DECLARE_SINGLE_BOUND_TEMP_2(FUNCTION, Z_AXIS) \
FORWARD_DECLARE_SINGLE_BOUND_TEMP_2(FUNCTION, Y_AXIS)
/**
* Unrolled derivation operators utilities.
*/
#define DERIVE_STATEMENT_2(ix, offset_1, offset_2, coeff_offset, sign, x, coeff, output, y) \
output = fma(x[ix + (offset_1)] * y[ix + (offset_1)] sign x[ix - (offset_2)] * y[ix - (offset_2)], coeff[coeff_offset], output);
#define DERIVE_STATEMENT_1(ix, offset_1, offset_2, coeff_offset, sign, x, coeff, output) \
output = fma(x[ix + (offset_1)] sign x[ix - (offset_2)], coeff[(coeff_offset)], output);
#define GET_MACRO(_1, _2, _3, _4, _5, _6, _7, _8, _9, NAME, ...) NAME
#define DERIVE_STATEMENT(...) GET_MACRO(__VA_ARGS__, DERIVE_STATEMENT_2, DERIVE_STATEMENT_1)(__VA_ARGS__)
#define DERIVE_GENERIC_AXIS(ix, calculate_offset, offset_1, offset_2, sign, ...) \
DERIVE_STATEMENT(ix, calculate_offset(offset_1, 0), calculate_offset(offset_2, 0), 0, sign, __VA_ARGS__) \
if constexpr (HALF_LENGTH_ > 1) { \
DERIVE_STATEMENT(ix, calculate_offset(offset_1, 1), calculate_offset(offset_2, 1), 1, sign, __VA_ARGS__) \
} \
if constexpr (HALF_LENGTH_ > 2) { \
DERIVE_STATEMENT(ix, calculate_offset(offset_1, 2), calculate_offset(offset_2, 2), 2, sign, __VA_ARGS__) \
DERIVE_STATEMENT(ix, calculate_offset(offset_1, 3), calculate_offset(offset_2, 3), 3, sign, __VA_ARGS__) \
} \
if constexpr (HALF_LENGTH_ > 4) { \
DERIVE_STATEMENT(ix, calculate_offset(offset_1, 4), calculate_offset(offset_2, 4), 4, sign, __VA_ARGS__) \
DERIVE_STATEMENT(ix, calculate_offset(offset_1, 5), calculate_offset(offset_2, 5), 5, sign, __VA_ARGS__) \
} \
if constexpr (HALF_LENGTH_ > 6) { \
DERIVE_STATEMENT(ix, calculate_offset(offset_1, 6), calculate_offset(offset_2, 6), 6, sign, __VA_ARGS__) \
DERIVE_STATEMENT(ix, calculate_offset(offset_1, 7), calculate_offset(offset_2, 7), 7, sign, __VA_ARGS__) \
}
#define SEQ_OFFSET_CAL(offset, index) (index + offset)
#define ARRAY_OFFSET_CAL(offset, index) (offset[index])
#define JUMP_OFFSET_CALCULATION(factor) factor * SEQ_OFFSET_CAL
#define DERIVE_SEQ_AXIS_EQ_OFF(index, offset, sign, ...) \
DERIVE_GENERIC_AXIS(index, SEQ_OFFSET_CAL, offset, offset, sign, __VA_ARGS__)
#define DERIVE_ARRAY_AXIS_EQ_OFF(index, offset, sign, ...) \
DERIVE_GENERIC_AXIS(index, ARRAY_OFFSET_CAL, offset, offset, sign, __VA_ARGS__)
#define DERIVE_JUMP_AXIS_EQ_OFF(index, jump, offset, sign, ...) \
DERIVE_GENERIC_AXIS(index, JUMP_OFFSET_CALCULATION(jump), offset, offset, sign, __VA_ARGS__)
#define DERIVE_SEQ_AXIS(index, offset_1, offset_2, sign, ...) \
DERIVE_GENERIC_AXIS(index, SEQ_OFFSET_CAL, offset_1, offset_2, sign, __VA_ARGS__)
#define DERIVE_ARRAY_AXIS(index, offset_1, offset_2, sign, ...) \
DERIVE_GENERIC_AXIS(index, ARRAY_OFFSET_CAL, offset_1, offset_2, sign, __VA_ARGS__)
#define DERIVE_JUMP_AXIS(index, jump, offset_1, offset_2, sign, ...) \
DERIVE_GENERIC_AXIS(index, JUMP_OFFSET_CALCULATION(jump), offset_1, offset_2, sign, __VA_ARGS__)
#endif //OPERATIONS_LIB_COMPONENTS_COMPUTATION_KERNELS_BASE_COMPUTATION_HELPERS_HPP
| 6,846
|
C++
|
.h
| 113
| 56.929204
| 132
| 0.704532
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,355
|
StaggeredComputationKernel.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/SeismicOperations/include/operations/components/independents/concrete/computation-kernels/isotropic/StaggeredComputationKernel.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of SeismicToolbox.
*
* SeismicToolbox is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SeismicToolbox is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPERATIONS_LIB_COMPONENTS_COMPUTATION_KERNELS_STAGGERED_ORDER_COMPUTATION_KERNEL_HPP
#define OPERATIONS_LIB_COMPONENTS_COMPUTATION_KERNELS_STAGGERED_ORDER_COMPUTATION_KERNEL_HPP
#include <operations/components/independents/primitive/ComputationKernel.hpp>
#include <operations/components/dependency/concrete/HasNoDependents.hpp>
namespace operations {
namespace components {
class StaggeredComputationKernel : public ComputationKernel, public dependency::HasNoDependents {
public:
explicit StaggeredComputationKernel(bs::base::configurations::ConfigurationMap *apConfigurationMap);
StaggeredComputationKernel(const StaggeredComputationKernel &aStaggeredComputationKernel);
~StaggeredComputationKernel() override;
ComputationKernel *Clone() override;
void SetComputationParameters(common::ComputationParameters *apParameters) override;
void SetGridBox(dataunits::GridBox *apGridBox) override;
void Step() override;
MemoryHandler *GetMemoryHandler() override;
void AcquireConfiguration() override;
void PreprocessModel() override;
private:
template<KERNEL_MODE KERNEL_MODE_>
void ComputeAll();
template<KERNEL_MODE KERNEL_MODE_, bool IS_2D_>
void ComputeAll();
template<KERNEL_MODE KERNEL_MODE_, bool IS_2D_, HALF_LENGTH HALF_LENGTH_>
void ComputeAll();
template<KERNEL_MODE KERNEL_MODE_, bool IS_2D_, HALF_LENGTH HALF_LENGTH_>
void ComputePressure();
template<KERNEL_MODE KERNEL_MODE_, bool IS_2D_, HALF_LENGTH HALF_LENGTH_>
void ComputeVelocity();
void InitializeVariables();
private:
common::ComputationParameters *mpParameters = nullptr;
dataunits::GridBox *mpGridBox = nullptr;
/// Dataframe for the staggered finite difference coefficients.
dataunits::FrameBuffer<float> *mpCoeff = nullptr;
dataunits::FrameBuffer<int> *mpVerticalIdx = nullptr;
};
}//namespace components
}//namespace operations
#endif // OPERATIONS_LIB_COMPONENTS_COMPUTATION_KERNELS_STAGGERED_ORDER_COMPUTATION_KERNEL_HPP
| 3,045
|
C++
|
.h
| 58
| 44.586207
| 112
| 0.720891
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,356
|
SecondOrderComputationKernel.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/SeismicOperations/include/operations/components/independents/concrete/computation-kernels/isotropic/SecondOrderComputationKernel.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of SeismicToolbox.
*
* SeismicToolbox is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SeismicToolbox is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPERATIONS_LIB_COMPONENTS_COMPUTATION_KERNELS_SECOND_ORDER_COMPUTATION_KERNEL_HPP
#define OPERATIONS_LIB_COMPONENTS_COMPUTATION_KERNELS_SECOND_ORDER_COMPUTATION_KERNEL_HPP
#include <operations/components/independents/primitive/ComputationKernel.hpp>
#include <operations/components/dependency/concrete/HasNoDependents.hpp>
namespace operations {
namespace components {
class SecondOrderComputationKernel : public ComputationKernel,
public dependency::HasNoDependents {
public:
explicit SecondOrderComputationKernel(bs::base::configurations::ConfigurationMap *apConfigurationMap);
SecondOrderComputationKernel(const SecondOrderComputationKernel &);
~SecondOrderComputationKernel() override;
ComputationKernel *Clone() override;
void SetComputationParameters(common::ComputationParameters *apParameters) override;
void SetGridBox(dataunits::GridBox *apGridBox) override;
void Step() override;
MemoryHandler *GetMemoryHandler() override;
void AcquireConfiguration() override;
void PreprocessModel() override;
private:
template<KERNEL_MODE KERNEL_MODE_>
void Compute();
template<KERNEL_MODE KERNEL_MODE_, bool IS_2D_>
void Compute();
template<KERNEL_MODE KERNEL_MODE_, bool IS_2D_, HALF_LENGTH HALF_LENGTH_>
void Compute();
void InitializeVariables();
private:
common::ComputationParameters *mpParameters = nullptr;
dataunits::GridBox *mpGridBox = nullptr;
dataunits::FrameBuffer<float> *mpCoeffX = nullptr;
dataunits::FrameBuffer<float> *mpCoeffY = nullptr;
dataunits::FrameBuffer<float> *mpCoeffZ = nullptr;
dataunits::FrameBuffer<int> *mpFrontalIdx = nullptr;
dataunits::FrameBuffer<int> *mpVerticalIdx = nullptr;
float mCoeffXYZ;
};
}//namespace components
}//namespace operations
#endif // OPERATIONS_LIB_COMPONENTS_COMPUTATION_KERNELS_SECOND_ORDER_COMPUTATION_KERNEL_HPP
| 2,956
|
C++
|
.h
| 58
| 42.482759
| 114
| 0.70842
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,357
|
SpongeBoundaryManager.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/SeismicOperations/include/operations/components/independents/concrete/boundary-managers/SpongeBoundaryManager.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of SeismicToolbox.
*
* SeismicToolbox is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SeismicToolbox is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPERATIONS_LIB_COMPONENTS_BOUNDARY_MANAGERS_SPONGE_BOUNDARY_MANAGER_HPP
#define OPERATIONS_LIB_COMPONENTS_BOUNDARY_MANAGERS_SPONGE_BOUNDARY_MANAGER_HPP
#include <vector>
#include <operations/components/independents/concrete/boundary-managers/extensions/Extension.hpp>
#include <operations/components/independents/primitive/BoundaryManager.hpp>
#include <operations/components/dependency/concrete/HasNoDependents.hpp>
namespace operations {
namespace components {
class SpongeBoundaryManager : public BoundaryManager,
public dependency::HasNoDependents {
public:
explicit SpongeBoundaryManager(bs::base::configurations::ConfigurationMap *apConfigurationMap);
~SpongeBoundaryManager() override;
void ApplyBoundary(uint kernel_id) override;
void ExtendModel() override;
void ReExtendModel() override;
void SetComputationParameters(common::ComputationParameters *apParameters) override;
void SetGridBox(dataunits::GridBox *apGridBox) override;
void AdjustModelForBackward() override;
void AcquireConfiguration() override;
private:
void InitializeExtensions();
float Calculation(int index);
void ApplyBoundaryOnField(float *next);
private:
dataunits::GridBox *mpGridBox = nullptr;
common::ComputationParameters *mpParameters = nullptr;
std::vector<addons::Extension *> mvExtensions;
dataunits::FrameBuffer<float> *mpSpongeCoefficients;
bool mUseTopLayer;
};
}//namespace components
}//namespace operations
#endif // OPERATIONS_LIB_COMPONENTS_BOUNDARY_MANAGERS_SPONGE_BOUNDARY_MANAGER_HPP
| 2,562
|
C++
|
.h
| 52
| 41.923077
| 107
| 0.728991
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,358
|
CPMLBoundaryManager.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/SeismicOperations/include/operations/components/independents/concrete/boundary-managers/CPMLBoundaryManager.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of SeismicToolbox.
*
* SeismicToolbox is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SeismicToolbox is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPERATIONS_LIB_COMPONENTS_BOUNDARY_MANAGERS_CPML_BOUNDARY_MANAGER_HPP
#define OPERATIONS_LIB_COMPONENTS_BOUNDARY_MANAGERS_CPML_BOUNDARY_MANAGER_HPP
#include <cmath>
#include <bs/base/memory/MemoryManager.hpp>
#include <operations/components/independents/concrete/boundary-managers/extensions/Extension.hpp>
#include <operations/components/independents/primitive/BoundaryManager.hpp>
#include <operations/components/dependency/concrete/HasNoDependents.hpp>
namespace operations {
namespace components {
class CPMLBoundaryManager : public BoundaryManager,
public dependency::HasNoDependents {
public:
explicit CPMLBoundaryManager(
bs::base::configurations::ConfigurationMap *apConfigurationMap);
~CPMLBoundaryManager() override;
void ApplyBoundary(uint kernel_id) override;
void ExtendModel() override;
void ReExtendModel() override;
void AdjustModelForBackward() override;
void SetComputationParameters(common::ComputationParameters *apParameters) override;
void SetGridBox(dataunits::GridBox *apGridBox) override;
void AcquireConfiguration() override;
private:
template<int DIRECTION_>
void FillCPMLCoefficients();
template<int DIRECTION_, bool OPPOSITE_, int HALF_LENGTH_>
void CalculateFirstAuxiliary();
template<int DIRECTION_, bool OPPOSITE_, int HALF_LENGTH_>
void CalculateCPMLValue();
template<int HALF_LENGTH_>
void ApplyAllCPML();
void InitializeVariables();
void ResetVariables();
private:
common::ComputationParameters *mpParameters = nullptr;
dataunits::GridBox *mpGridBox = nullptr;
addons::Extension *mpExtension = nullptr;
dataunits::FrameBuffer<float> *mpCoeffax;
dataunits::FrameBuffer<float> *mpCoeffbx;
dataunits::FrameBuffer<float> *mpCoeffaz;
dataunits::FrameBuffer<float> *mpCoeffbz;
dataunits::FrameBuffer<float> *mpCoeffay;
dataunits::FrameBuffer<float> *mpCoeffby;
dataunits::FrameBuffer<float> *mpAux1xup;
dataunits::FrameBuffer<float> *mpAux1xdown;
dataunits::FrameBuffer<float> *mpAux1zup;
dataunits::FrameBuffer<float> *mpAux1zdown;
dataunits::FrameBuffer<float> *mpAux1yup;
dataunits::FrameBuffer<float> *mpAux1ydown;
dataunits::FrameBuffer<float> *mpAux2xup;
dataunits::FrameBuffer<float> *mpAux2xdown;
dataunits::FrameBuffer<float> *mpAux2zup;
dataunits::FrameBuffer<float> *mpAux2zdown;
dataunits::FrameBuffer<float> *mpAux2yup;
dataunits::FrameBuffer<float> *mpAux2ydown;
dataunits::FrameBuffer<float> *mpFirstCoeffx;
dataunits::FrameBuffer<float> *mpFirstCoeffz;
dataunits::FrameBuffer<float> *mpFirstCoeffy;
dataunits::FrameBuffer<float> *mpSecondCoeffx;
dataunits::FrameBuffer<float> *mpSecondCoeffz;
dataunits::FrameBuffer<float> *mpSecondCoeffy;
dataunits::FrameBuffer<int> *mpDistanceDim1;
dataunits::FrameBuffer<int> *mpDistanceDim2;
dataunits::FrameBuffer<int> *mpDistanceDim3;
float mMaxVel;
float mRelaxCoefficient;
float mShiftRatio;
float mReflectCoefficient;
bool mUseTopLayer;
};
}//namespace components
}//namespace operations
#endif // OPERATIONS_LIB_COMPONENTS_BOUNDARY_MANAGERS_CPML_BOUNDARY_MANAGER_HPP
| 4,504
|
C++
|
.h
| 91
| 39.714286
| 97
| 0.68606
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,359
|
NoBoundaryManager.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/SeismicOperations/include/operations/components/independents/concrete/boundary-managers/NoBoundaryManager.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of SeismicToolbox.
*
* SeismicToolbox is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SeismicToolbox is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPERATIONS_LIB_COMPONENTS_BOUNDARY_MANAGERS_NO_BOUNDARY_MANAGER_HPP
#define OPERATIONS_LIB_COMPONENTS_BOUNDARY_MANAGERS_NO_BOUNDARY_MANAGER_HPP
#include <vector>
#include <operations/components/independents/concrete/boundary-managers/extensions/Extension.hpp>
#include <operations/components/independents/primitive/BoundaryManager.hpp>
#include <operations/components/dependency/concrete/HasNoDependents.hpp>
namespace operations {
namespace components {
class NoBoundaryManager : public BoundaryManager,
public dependency::HasNoDependents {
public:
explicit NoBoundaryManager(bs::base::configurations::ConfigurationMap *apConfigurationMap);
~NoBoundaryManager() override;
void ApplyBoundary(uint kernel_id) override;
void ExtendModel() override;
void ReExtendModel() override;
void SetComputationParameters(common::ComputationParameters *apParameters) override;
void SetGridBox(dataunits::GridBox *apGridBox) override;
void AdjustModelForBackward() override;
void AcquireConfiguration() override;
private:
void InitializeExtensions();
private:
common::ComputationParameters *mpParameters = nullptr;
dataunits::GridBox *mpGridBox = nullptr;
std::vector<addons::Extension *> mvExtensions;
};
}//namespace components
}//namespace operations
#endif // OPERATIONS_LIB_COMPONENTS_BOUNDARY_MANAGERS_NO_BOUNDARY_MANAGER_HPP
| 2,340
|
C++
|
.h
| 48
| 42.041667
| 103
| 0.735152
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,360
|
StaggeredCPMLBoundaryManager.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/SeismicOperations/include/operations/components/independents/concrete/boundary-managers/StaggeredCPMLBoundaryManager.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of SeismicToolbox.
*
* SeismicToolbox is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SeismicToolbox is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPERATIONS_LIB_COMPONENTS_BOUNDARY_MANAGERS_STAGGERED_CPML_BOUNDARY_MANAGER_HPP
#define OPERATIONS_LIB_COMPONENTS_BOUNDARY_MANAGERS_STAGGERED_CPML_BOUNDARY_MANAGER_HPP
#include <vector>
#include <bs/base/memory/MemoryManager.hpp>
#include <operations/components/independents/concrete/boundary-managers/extensions/Extension.hpp>
#include <operations/components/independents/primitive/BoundaryManager.hpp>
#include <operations/components/dependency/concrete/HasNoDependents.hpp>
namespace operations {
namespace components {
class StaggeredCPMLBoundaryManager : public BoundaryManager,
public dependency::HasNoDependents {
public:
explicit StaggeredCPMLBoundaryManager(bs::base::configurations::ConfigurationMap *apConfigurationMap);
~StaggeredCPMLBoundaryManager() override;
void ApplyBoundary(uint kernel_id) override;
void ExtendModel() override;
void ReExtendModel() override;
void SetComputationParameters(common::ComputationParameters *apParameters) override;
void SetGridBox(dataunits::GridBox *apGridBox) override;
void AdjustModelForBackward() override;
void AcquireConfiguration() override;
private:
void InitializeExtensions();
void
FillCPMLCoefficients(float *apCoeff_a, float *apCoeff_b, int aBoundaryLength, int aHalfLength, float aDh,
float aDt,
float aMaxVel, float aShiftRatio, float aReflectCoeff, float aRelaxCp);
void ZeroAuxiliaryVariables();
template<bool ADJOINT_, int DIRECTION_, bool OPPOSITE_, int HALF_LENGTH_>
void CalculateVelocityFirstAuxiliary();
template<bool ADJOINT_, int DIRECTION_, bool OPPOSITE_, int HALF_LENGTH_>
void CalculateVelocityCPMLValue();
template<bool ADJOINT_, int DIRECTION_, bool OPPOSITE_, int HALF_LENGTH_>
void CalculatePressureFirstAuxiliary();
template<bool ADJOINT_, int DIRECTION_, bool OPPOSITE_, int HALF_LENGTH_>
void CalculatePressureCPMLValue();
template<bool ADJOINT_, int HALF_LENGTH_>
void ApplyVelocityCPML();
template<bool ADJOINT_, int HALF_LENGTH_>
void ApplyPressureCPML();
template<bool ADJOINT_>
void ApplyVelocityCPML();
template<bool ADJOINT_>
void ApplyPressureCPML();
private:
common::ComputationParameters *mpParameters = nullptr;
dataunits::GridBox *mpGridBox = nullptr;
std::vector<addons::Extension *> mvExtensions;
bool mUseTopLayer;
float mMaxVelocity;
float mReflectCoefficient = 0.1;
float mShiftRatio = 0.1;
float mRelaxCoefficient = 1;
dataunits::FrameBuffer<float> *mpSmall_a_x = nullptr;
dataunits::FrameBuffer<float> *mpSmall_a_y = nullptr;
dataunits::FrameBuffer<float> *mpSmall_a_z = nullptr;
dataunits::FrameBuffer<float> *mpSmall_b_x = nullptr;
dataunits::FrameBuffer<float> *mpSmall_b_y = nullptr;
dataunits::FrameBuffer<float> *mpSmall_b_z = nullptr;
dataunits::FrameBuffer<float> *mpAuxiliary_vel_x_left = nullptr;
dataunits::FrameBuffer<float> *mpAuxiliary_vel_x_right = nullptr;
dataunits::FrameBuffer<float> *mpAuxiliary_vel_y_up = nullptr;
dataunits::FrameBuffer<float> *mpAuxiliary_vel_y_down = nullptr;
dataunits::FrameBuffer<float> *mpAuxiliary_vel_z_up = nullptr;
dataunits::FrameBuffer<float> *mpAuxiliary_vel_z_down = nullptr;
dataunits::FrameBuffer<float> *mpAuxiliary_ptr_x_left = nullptr;
dataunits::FrameBuffer<float> *mpAuxiliary_ptr_x_right = nullptr;
dataunits::FrameBuffer<float> *mpAuxiliary_ptr_y_up = nullptr;
dataunits::FrameBuffer<float> *mpAuxiliary_ptr_y_down = nullptr;
dataunits::FrameBuffer<float> *mpAuxiliary_ptr_z_up = nullptr;
dataunits::FrameBuffer<float> *mpAuxiliary_ptr_z_down = nullptr;
dataunits::FrameBuffer<float> *mpCoeff = nullptr;
};
}//namespace components
}//namespace operations
#endif //OPERATIONS_LIB_COMPONENTS_BOUNDARY_MANAGERS_STAGGERED_CPML_BOUNDARY_MANAGER_HPP
| 5,248
|
C++
|
.h
| 94
| 45.37234
| 117
| 0.681792
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,361
|
RandomBoundaryManager.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/SeismicOperations/include/operations/components/independents/concrete/boundary-managers/RandomBoundaryManager.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of SeismicToolbox.
*
* SeismicToolbox is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SeismicToolbox is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPERATIONS_LIB_COMPONENTS_BOUNDARY_MANAGERS_RANDOM_BOUNDARY_MANAGER_HPP
#define OPERATIONS_LIB_COMPONENTS_BOUNDARY_MANAGERS_RANDOM_BOUNDARY_MANAGER_HPP
#include <vector>
#include <operations/components/independents/concrete/boundary-managers/extensions/Extension.hpp>
#include <operations/components/independents/primitive/BoundaryManager.hpp>
#include <operations/components/dependency/concrete/HasNoDependents.hpp>
namespace operations {
namespace components {
/**
* @note
* Random Boundary Manager is based on the following paper:
* https://library.seg.org/doi/abs/10.1190/1.3255432.
*/
class RandomBoundaryManager : public BoundaryManager,
public dependency::HasNoDependents {
public:
explicit RandomBoundaryManager(bs::base::configurations::ConfigurationMap *apConfigurationMap);
~RandomBoundaryManager() override;
void ApplyBoundary(uint kernel_id) override;
void ExtendModel() override;
void ReExtendModel() override;
void SetComputationParameters(common::ComputationParameters *apParameters) override;
void SetGridBox(dataunits::GridBox *apGridBox) override;
void AdjustModelForBackward() override;
void AcquireConfiguration() override;
private:
void InitializeExtensions();
private:
common::ComputationParameters *mpParameters = nullptr;
dataunits::GridBox *mpGridBox = nullptr;
std::vector<addons::Extension *> mvExtensions;
int mGrainSideLength;
};
}//namespace components
}//namespace operations
#endif // OPERATIONS_LIB_COMPONENTS_BOUNDARY_MANAGERS_RANDOM_BOUNDARY_MANAGER_HPP
| 2,575
|
C++
|
.h
| 54
| 40.462963
| 107
| 0.7212
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,362
|
RandomExtension.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/SeismicOperations/include/operations/components/independents/concrete/boundary-managers/extensions/RandomExtension.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of SeismicToolbox.
*
* SeismicToolbox is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SeismicToolbox is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPERATIONS_LIB_COMPONENTS_EXTENSIONS_RANDOM_EXTENSION_HPP
#define OPERATIONS_LIB_COMPONENTS_EXTENSIONS_RANDOM_EXTENSION_HPP
#include <stdlib.h>
#include <random>
#include <operations/components/independents/concrete/boundary-managers/extensions/Extension.hpp>
namespace operations {
namespace components {
namespace addons {
/**
* @brief generates a random value based on the values of bound_l and x between 0 and 1
*
*/
#define GET_RANDOM_VALUE(bound_l, x) ((float) rand() / RAND_MAX) * ((float) (bound_l - (x)) / bound_l)
/**
* @brief generates a random float number between 0 and 1
*
*/
#define RANDOM_VALUE (float) rand() / RAND_MAX
class RandomExtension : public Extension {
public:
RandomExtension(int aGrainSideLength) :
mGrainSideLength(aGrainSideLength) {}
private:
void VelocityExtensionHelper(float *apPropertyArray,
int aStartX, int aStartY, int aStartZ,
int aEndX, int aEndY, int aEndZ,
int aNx, int aNy, int aNz,
uint aBoundaryLength) override;
void TopLayerExtensionHelper(float *apPropertyArray,
int aStartX, int aStartY, int aStartZ,
int aEndX, int aEndY, int aEndZ,
int aNx, int aNy, int aNz,
uint aBoundaryLength) override;
void TopLayerRemoverHelper(float *apPropertyArray,
int aStartX, int aStartY, int aStartZ,
int aEndX, int aEndY, int aEndZ,
int aNx, int aNy, int aNz,
uint aBoundaryLength) override;
/// Grain side length.
int mGrainSideLength;
};
}//namespace addons
}//namespace components
}//namespace operations
#endif // OPERATIONS_LIB_COMPONENTS_EXTENSIONS_RANDOM_EXTENSION_HPP
| 3,115
|
C++
|
.h
| 63
| 34.84127
| 102
| 0.572697
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,363
|
ZeroExtension.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/SeismicOperations/include/operations/components/independents/concrete/boundary-managers/extensions/ZeroExtension.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of SeismicToolbox.
*
* SeismicToolbox is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SeismicToolbox is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPERATIONS_LIB_COMPONENTS_EXTENSIONS_ZERO_EXTENSION_HPP
#define OPERATIONS_LIB_COMPONENTS_EXTENSIONS_ZERO_EXTENSION_HPP
#include <operations/components/independents/concrete/boundary-managers/extensions/Extension.hpp>
namespace operations {
namespace components {
namespace addons {
class ZeroExtension : public Extension {
private:
void VelocityExtensionHelper(float *property_array,
int start_x, int start_y, int start_z,
int end_x, int end_y, int end_z,
int nx, int ny, int nz,
uint boundary_length) override;
void TopLayerExtensionHelper(float *property_array,
int start_x, int start_y, int start_z,
int end_x, int end_y, int end_z,
int nx, int ny, int nz,
uint boundary_length) override;
void TopLayerRemoverHelper(float *property_array,
int start_x, int start_y, int start_z,
int end_x, int end_y, int end_z,
int nx, int ny, int nz,
uint boundary_length) override;
};
}//namespace addons
}//namespace components
}//namespace operations
#endif // OPERATIONS_LIB_COMPONENTS_EXTENSIONS_ZERO_EXTENSION_HPP
| 2,421
|
C++
|
.h
| 46
| 37.195652
| 97
| 0.574324
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,364
|
MinExtension.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/SeismicOperations/include/operations/components/independents/concrete/boundary-managers/extensions/MinExtension.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of SeismicToolbox.
*
* SeismicToolbox is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SeismicToolbox is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPERATIONS_LIB_COMPONENTS_EXTENSIONS_MIN_EXTENSION_HPP
#define OPERATIONS_LIB_COMPONENTS_EXTENSIONS_MIN_EXTENSION_HPP
#include <operations/components/independents/concrete/boundary-managers/extensions/Extension.hpp>
namespace operations {
namespace components {
namespace addons {
class MinExtension : public Extension {
private:
void VelocityExtensionHelper(float *property_array,
int start_x, int start_y, int start_z,
int end_x, int end_y, int end_z,
int nx, int ny, int nz,
uint boundary_length) override;
void TopLayerExtensionHelper(float *property_array,
int start_x, int start_y, int start_z,
int end_x, int end_y, int end_z,
int nx, int ny, int nz,
uint boundary_length) override;
void TopLayerRemoverHelper(float *property_array,
int start_x, int start_y, int start_z,
int end_x, int end_y, int end_z,
int nx, int ny, int nz,
uint boundary_length) override;
};
}//namespace addons
}//namespace components
}//namespace operations
#endif // OPERATIONS_LIB_COMPONENTS_EXTENSIONS_MIN_EXTENSION_HPP
| 2,417
|
C++
|
.h
| 46
| 37.108696
| 97
| 0.573604
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,365
|
Extension.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/SeismicOperations/include/operations/components/independents/concrete/boundary-managers/extensions/Extension.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of SeismicToolbox.
*
* SeismicToolbox is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SeismicToolbox is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPERATIONS_LIB_COMPONENTS_EXTENSIONS_EXTENSION_HPP
#define OPERATIONS_LIB_COMPONENTS_EXTENSIONS_EXTENSION_HPP
#include <operations/data-units/concrete/holders/GridBox.hpp>
namespace operations {
namespace components {
namespace addons {
/**
* @brief Class used for the extensions of velocities for full or window model.
* Provides standard procedures such as velocity backup and restoring,
* and logic controlling the extensions however leaves the actual extensions
* function to subclasses to allow different implementations.
*/
class Extension {
public:
/**
* @brief Constructor
*/
Extension();
/**
* @brief Destructor
*/
virtual ~Extension();
/**
* @brief Extend the velocities at boundaries.
*/
void ExtendProperty();
/**
* @brief In case of window mode extend the velocities at boundaries, re-extend the
* top layer velocities.
*/
void ReExtendProperty();
/**
* @brief Zeros out the top layer in preparation of the backward propagation.
*/
void AdjustPropertyForBackward();
/**
* @brief Sets the half length padding used in the extensions operations.
*/
void SetHalfLength(uint aHalfLength);
/**
* @brief Sets the boundary length used in the extensions operations.
*/
void SetBoundaryLength(uint aBoundaryLength);
/**
* @brief Sets the grid box that the operations are ran on.
*/
void SetGridBox(dataunits::GridBox *apGridBox);
/**
* @brief Sets the property that will be extended by this extensions object.
*/
void SetProperty(float *property, float *window_property);
private:
/**
* @brief The original_array extensions actual function, will be called in the extend
* original_array and ReExtend original_array functions.
* This function will be overridden by each subclass of extensions providing
* different ways of extending the original_array like extending it by zeros,
* randomly or otherwise.
*/
virtual void VelocityExtensionHelper(float *original_array,
int start_x, int start_y, int start_z,
int end_x, int end_y, int end_z,
int nx, int ny, int nz,
uint boundary_length) = 0;
/**
* @brief A helper function responsible of the extensions of the velocities for only
* the top layer. Called in the ReExtend original_array function. This
* function will be overridden by each subclass of extensions providing
* different ways of extending the original_array like extending it by zeros,
* randomly or otherwise.
*/
virtual void TopLayerExtensionHelper(float *original_array,
int start_x, int start_y, int start_z,
int end_x, int end_y, int end_z,
int nx, int ny, int nz,
uint boundary_length) = 0;
/**
* @brief A helper function responsible of the removal of the velocities for only the
* top layer. Called in the Adjust original_array for backward function. This
* function will be overridden by each subclass of extensions providing
* different ways of the removal of the top layer boundary.
*/
virtual void TopLayerRemoverHelper(float *original_array,
int start_x, int start_y, int start_z,
int end_x, int end_y, int end_z,
int nx, int ny, int nz,
uint boundary_length) = 0;
protected:
/// Grid to extend its velocities/properties.
dataunits::GridBox *mpGridBox = nullptr;
private:
/// Property to be extended by an extensions object.
float *mProperties = nullptr;
/// Window property array to be used if provided for moving window.
float *mpWindowProperties = nullptr;
/// Boundary length.
uint mBoundaryLength;
/// Half length of the used kernel.
uint mHalfLength;
};
}//namespace addons
}//namespace components
}//namespace operations
#endif // OPERATIONS_LIB_COMPONENTS_EXTENSIONS_EXTENSION_HPP
| 6,256
|
C++
|
.h
| 122
| 33.95082
| 101
| 0.534663
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,366
|
HomogenousExtension.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/SeismicOperations/include/operations/components/independents/concrete/boundary-managers/extensions/HomogenousExtension.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of SeismicToolbox.
*
* SeismicToolbox is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SeismicToolbox is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPERATIONS_LIB_COMPONENTS_EXTENSIONS_HOMOGENOUS_EXTENSION_HPP
#define OPERATIONS_LIB_COMPONENTS_EXTENSIONS_HOMOGENOUS_EXTENSION_HPP
#include <operations/components/independents/concrete/boundary-managers/extensions/Extension.hpp>
namespace operations {
namespace components {
namespace addons {
class HomogenousExtension : public Extension {
public:
HomogenousExtension(bool use_top_layer = true);
private:
void VelocityExtensionHelper(float *property_array,
int start_x, int start_y, int start_z,
int end_x, int end_y, int end_z,
int nx, int ny, int nz,
uint boundary_length) override;
void TopLayerExtensionHelper(float *property_array,
int start_x, int start_y, int start_z,
int end_x, int end_y, int end_z,
int nx, int ny, int nz,
uint boundary_length) override;
void TopLayerRemoverHelper(float *property_array,
int start_x, int start_y, int start_z,
int end_x, int end_y, int end_z,
int nx, int ny, int nz,
uint boundary_length) override;
private:
bool mUseTop;
};
}//namespace addons
}//namespace components
}//namespace operations
#endif // OPERATIONS_LIB_COMPONENTS_EXTENSIONS_HOMOGENOUS_EXTENSION_HPP
| 2,582
|
C++
|
.h
| 50
| 36.2
| 97
| 0.573127
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,367
|
Component.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/SeismicOperations/include/operations/components/independents/interface/Component.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of SeismicToolbox.
*
* SeismicToolbox is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SeismicToolbox is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPERATIONS_LIB_COMPONENTS_COMPONENT_HPP
#define OPERATIONS_LIB_COMPONENTS_COMPONENT_HPP
#include <bs/base/configurations/interface/Configurable.hpp>
#include <operations/components/dependency/interface/Dependency.hpp>
#include <operations/components/dependency/helpers/ComponentsMap.tpp>
#include <operations/components/dependents/interface/DependentComponent.hpp>
#include <operations/common/ComputationParameters.hpp>
#include <operations/data-units/concrete/holders/GridBox.hpp>
namespace operations {
namespace components {
/**
* @brief Component interface. All components in the Seismic Framework
* needs to extend it.
*
* @note Each engine comes with it's own Timer and Logger. Logger
* Channel should be initialized at each concrete implementation
* and should be destructed at each destructor.
*/
class Component : virtual public dependency::Dependency,
public bs::base::configurations::Configurable {
public:
/**
* @brief Destructors should be overridden to ensure correct memory management.
*/
virtual ~Component() = default;
/**
* @brief Sets the computation parameters to be used for the component.
*
* @param[in] apParameters
* Parameters of the simulation independent from the grid.
*/
virtual void SetComputationParameters(common::ComputationParameters *apParameters) = 0;
/**
* @brief Sets the grid box to operate on.
*
* @param[in] apGridBox
* The designated grid box to run operations on.
*/
virtual void SetGridBox(dataunits::GridBox *apGridBox) = 0;
/**
* @brief Sets Components Map. Let al components be aware of
* each other.
*
* @param[in] apComponentsMap
*/
void SetComponentsMap(operations::helpers::ComponentsMap<Component> *apComponentsMap) {
this->mpComponentsMap = apComponentsMap;
}
virtual Component *Clone() {
return nullptr;
}
protected:
/// Dependent Components Map
operations::helpers::ComponentsMap<DependentComponent> *mpDependentComponentsMap;
/// Independent Components Map
operations::helpers::ComponentsMap<Component> *mpComponentsMap;
/// Configurations Map
bs::base::configurations::ConfigurationMap *mpConfigurationMap;
};
}//namespace components
}//namespace operations
#endif // OPERATIONS_LIB_COMPONENTS_COMPONENT_HPP
| 3,538
|
C++
|
.h
| 80
| 35.425
| 99
| 0.663861
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,368
|
TraceWriter.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/SeismicOperations/include/operations/components/independents/primitive/TraceWriter.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of SeismicToolbox.
*
* SeismicToolbox is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SeismicToolbox is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPERATIONS_LIB_COMPONENTS_TRACE_WRITER_HPP
#define OPERATIONS_LIB_COMPONENTS_TRACE_WRITER_HPP
#include <operations/data-units/concrete/holders/TracesHolder.hpp>
#include <operations/components/independents/interface/Component.hpp>
namespace operations {
namespace components {
/**
* @brief This class is used to Record at each time step the
* pressure at the surface in the places we want to have receivers on.
* Can be considered as a hydrophone.
*/
class TraceWriter : public Component {
public:
/**
* @brief Destructors should be overridden to ensure correct memory management.
*/
virtual ~TraceWriter() {};
/**
* @brief
* Signals the start of a recording sequence
*/
virtual void StartRecordingInstance(
operations::dataunits::TracesHolder &aTracesHolder) = 0;
/**
* @brief Records the traces from the domain according to the
* configuration given in the initialize function.
*/
virtual void RecordTrace(uint time_step) = 0;
/**
* @brief
* Signals the end of a recording sequence
*
* @param[in] shot_id
* The shot id this recording is assigned.
*/
virtual void FinishRecordingInstance(uint shot_id) = 0;
/**
* @brief
* Finalize the trace writer.
*/
virtual void Finalize() = 0;
};
}//namespace components
}//namespace operations
#endif // OPERATIONS_LIB_COMPONENTS_TRACE_WRITER_HPP
| 2,497
|
C++
|
.h
| 63
| 31.301587
| 91
| 0.6385
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,369
|
BoundaryManager.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/SeismicOperations/include/operations/components/independents/primitive/BoundaryManager.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of SeismicToolbox.
*
* SeismicToolbox is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SeismicToolbox is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPERATIONS_LIB_COMPONENTS_BOUNDARY_MANAGER_HPP
#define OPERATIONS_LIB_COMPONENTS_BOUNDARY_MANAGER_HPP
#include <operations/components/independents/interface/Component.hpp>
#include <operations/common/DataTypes.h>
namespace operations {
namespace components {
/**
* @brief Boundary Manager Interface. All concrete techniques for absorbing
* boundary conditions should be implemented using this interface.
*/
class BoundaryManager : public Component {
public:
/**
* @brief Destructors should be overridden to ensure correct memory management.
*/
virtual ~BoundaryManager() {};
/**
* @brief This function will be responsible of applying the absorbing boundary
* condition on the current pressure frame.
*
* @param[in] kernel_id
* When provided with a kernel_id, this would lead to applying the boundaries
* on the designated kernel_id
* <ul>
* <li>kernel_id == 0 -> Pressure</li>
* <li>kernel_id == 1 -> Particle velocity</li>
* </ul>
*/
virtual void ApplyBoundary(uint kernel_id = 0) = 0;
/**
* @brief Extends the velocities/densities to the added boundary parts to the
* velocity/density of the model appropriately. This is only called once after
* the initialization of the model.
*/
virtual void ExtendModel() = 0;
/**
* @brief Extends the velocities/densities to the added boundary parts to the
* velocity/density of the model appropriately. This is called repeatedly with
* before the forward propagation of each shot.
*/
virtual void ReExtendModel() = 0;
/**
* @brief Adjusts the velocity/density of the model appropriately for the
* backward propagation. Normally, but not necessary, this means removing
* the top absorbing boundary layer. This is called repeatedly with before
* the backward propagation of each shot.
*/
virtual void AdjustModelForBackward() = 0;
/**
* @brief
* Sets the boundary to work in adjoint mode.
*
* @param[in] aAdjoint
* Boolean indicating if adjoint mode is active.
*/
void SetAdjoint(bool aAdjoint) {
this->mAdjoint = aAdjoint;
}
protected:
/// Whether this boundary is running on adjoint fields or not.
bool mAdjoint;
};
}//namespace components
}//namespace operations
#endif // OPERATIONS_LIB_COMPONENTS_BOUNDARY_MANAGER_HPP
| 3,647
|
C++
|
.h
| 83
| 34.313253
| 91
| 0.625563
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,370
|
ForwardCollector.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/SeismicOperations/include/operations/components/independents/primitive/ForwardCollector.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of SeismicToolbox.
*
* SeismicToolbox is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SeismicToolbox is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPERATIONS_LIB_COMPONENTS_FORWARD_COLLECTOR_HPP
#define OPERATIONS_LIB_COMPONENTS_FORWARD_COLLECTOR_HPP
#include <operations/components/independents/interface/Component.hpp>
#include <operations/common/DataTypes.h>
namespace operations {
namespace components {
/**
* @example
* 3 Way Propagation:
* <ol>
* <li>
* Reset Grid:
* <br>
* Before forward when it is called it just resetting the array (set it by zeros)
* </li>
* <li>
* Save Forward:
* <br>
* Called at each time step do no thing as it is 3 propagation.
* </li>
* <li>
* Reset Grid:
* <br>
* Consider 2 GridBox one for backward and the other for reverse.
* </li>
* <li>
* Fetch Forward:
* <br>
* Called at each time step to do internal computation kernel calculations to
* the corresponding time step (reverse propagation)
* </li>
* <li>
* Get Forward Grid:
* <br>
* Called at each time step to return the internal GridBox.
* </li>
* </ol>
*
* @note
* Correlation work on <b>current pressure</b>.
*/
/**
* @brief Forward Collector Interface. All concrete techniques for saving the
* forward propagation or restoring the results from it should be implemented
* using this interface.
*/
class ForwardCollector : public Component {
public:
/**
* @brief Destructors should be overridden to ensure correct memory management.
*/
virtual ~ForwardCollector() {};
/**
* @brief This function is called on each time step in the backward propagation
* and should restore (2 propagation) or set (3 propagation -reverse) the
* ForwardGrid variable to the suitable time step. The first call is expected
* to make ForwardGrid current frame point to the frame corresponding to time
* nt - 2.
*/
virtual void FetchForward() = 0;
/**
* @brief This function is called on each time step in the forward propagation
* and should store the current time step or save it in such a way that it can be
* later obtained internally and stored in the ForwardGrid option. The first
* call to this function happens when current frame in given grid is at
* time 1. update pointers to save it in the right place in case of 2
* propagation it will save in memory
*/
virtual void SaveForward() = 0;
/**
* @brief Resets the grid pressures or allocates new frames for the backward
* propagation. It should either free or keep track of the old frames.
* It is called one time per shot before forward or backward propagation
*
* @param[in] aIsForwardRun
* Indicates whether we are resetting the grid frame for the start of the
* run (Forward) or between the propagations (Before Backward).
* <br>
* <br>
* <b>True</b> indicates it is before the forward.
* <br>
* <b>False</b> indicates before backward.
*/
virtual void ResetGrid(bool aIsForwardRun) = 0;
/**
* @brief Getter to the internal GridBox to contain the current time step of
* the forward propagation. This will be accessed to be able to correlate the
* results in the backward propagation.
*
* @return[out]
* GridBox containing the appropriate values for the time that is implicitly
* calculated using fetch forward. this function is called on each time step.
*/
virtual dataunits::GridBox *GetForwardGrid() = 0;
};
}//namespace components
}//namespace operations
#endif // OPERATIONS_LIB_COMPONENTS_FORWARD_COLLECTOR_HPP
| 5,087
|
C++
|
.h
| 116
| 34.181034
| 94
| 0.596169
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,371
|
MigrationAccommodator.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/SeismicOperations/include/operations/components/independents/primitive/MigrationAccommodator.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of SeismicToolbox.
*
* SeismicToolbox is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SeismicToolbox is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPERATIONS_LIB_COMPONENTS_MIGRATION_ACCOMMODATOR_HPP
#define OPERATIONS_LIB_COMPONENTS_MIGRATION_ACCOMMODATOR_HPP
#include <operations/components/independents/interface/Component.hpp>
#include <operations/common/DataTypes.h>
#include <operations/data-units/concrete/migration/MigrationData.hpp>
namespace operations {
namespace components {
/**
* @brief Enum to hold illumination compensation categories.
* - No compensation will provide normal cross correlation
* - Source compensation will compensate the cross correlation stack for the source illumination effect
* - Receiver compensation will compensate the cross correlation stack for the receiver illumination effect
* - Combined compensation will compensate the cross correlation stack for both the source and the receiver illumination effect
*/
enum COMPENSATION_TYPE {
NO_COMPENSATION,
SOURCE_COMPENSATION,
RECEIVER_COMPENSATION,
COMBINED_COMPENSATION
};
/**
* @brief Migration Accommodator Interface. All concrete techniques for the
* imaging conditions should be implemented using this interface.
*/
class MigrationAccommodator : public Component {
public:
/**
* @brief Destructors should be overridden to ensure correct memory management.
*/
virtual ~MigrationAccommodator() {};
/**
* @brief Resets the single shot correlation results.
*/
virtual void ResetShotCorrelation() = 0;
/**
* @brief Stacks the single shot correlation current result
* into the stacked shot correlation.
*/
virtual void Stack() = 0;
/**
* @brief Correlates two frames using the dimensions provided in the
* meta data using an imaging condition and stacks/writes them in the
* single shot correlation result.
*
* @param apDataUnit[in]
* The pointer to the GridBox containing the first frame to be correlated.
* This should be the simulation or forward propagation result. Our frame of
* interest is the current one.
*/
virtual void Correlate(dataunits::DataUnit *apDataUnit) = 0;
/**
* @return
* The pointer to the array that should contain the results of the correlation
* of the frames of a single shot.
*/
virtual dataunits::FrameBuffer<float> *GetShotCorrelation() = 0;
/**
* @return
* The pointer to the array that should contain the results of the stacked
* correlation of the frames of all shots.
*/
virtual dataunits::FrameBuffer<float> *GetStackedShotCorrelation() = 0;
/**
* @return
* The pointer to the array that should contain the final results and
* details of the stacked correlation of the frames of all shots.
*/
virtual dataunits::MigrationData *GetMigrationData() = 0;
/**
* @brief Sets the compensation category according to CompensationType Enum
*
* @param in_1
* the compensation type that the correlation kernel would output at
* the end of migration
*/
virtual void SetCompensation(COMPENSATION_TYPE aCOMPENSATION_TYPE) = 0;
/**
* @brief Assigned the current processed trace's source point to this
* Migration Accommodator for further usage.
*
* @param aSourcePoint
*/
virtual void SetSourcePoint(Point3D *apSourcePoint) = 0;
};
}//namespace components
}//namespace operations
#endif // OPERATIONS_LIB_COMPONENTS_MIGRATION_ACCOMMODATOR_HPP
| 4,798
|
C++
|
.h
| 105
| 35.666667
| 135
| 0.642369
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,372
|
SourceInjector.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/SeismicOperations/include/operations/components/independents/primitive/SourceInjector.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of SeismicToolbox.
*
* SeismicToolbox is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SeismicToolbox is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPERATIONS_LIB_COMPONENTS_SOURCE_INJECTOR_HPP
#define OPERATIONS_LIB_COMPONENTS_SOURCE_INJECTOR_HPP
#include <operations/components/independents/interface/Component.hpp>
#include <operations/common/DataTypes.h>
namespace operations {
namespace components {
/**
* @brief Source Injector Interface. All concrete techniques for source
* injection should be implemented using this interface.
*/
class SourceInjector : public Component {
public:
/**
* @brief Destructors should be overridden to ensure correct memory management.
*/
virtual ~SourceInjector() {};
/**
* @brief Sets the source point to apply the injection to it.
*
* @param[in] source_point
* The designated source point.
*/
virtual void SetSourcePoint(Point3D *source_point) = 0;
/**
* @brief Apply source injection to the wave field(s). It should inject
* the current frame in our grid with the appropriate value. It should be
* responsible of controlling when to stop the injection.
*
* @param[in] time_step
* The time step corresponding to the current frame.
*/
virtual void ApplySource(int time_step) = 0;
/**
* @brief Applies Isotropic Field upon all parameters' models
*
* @see ComputationParameters->GetIsotropicRadius()
*/
virtual void ApplyIsotropicField() = 0;
/**
* @brief Reverts Isotropic Field upon all parameters' models
*
* @see ComputationParameters->GetIsotropicRadius()
*/
virtual void RevertIsotropicField() = 0;
/**
* @brief Gets the time step that the source injection would stop after.
*
* @return[out]
* An integer indicating the time step at which the source injection
* would stop.
*/
virtual int GetCutOffTimeStep() = 0;
/**
* @brief
* Get the number of negative timesteps to be done before
* the propagation.
*
* @return
* The number of timesteps that are done before the 0 time.
*/
virtual int GetPrePropagationNT() = 0;
/**
* @brief Gets the maximum frequency of the injector wavelet.
*
* @return[out]
* A floating point number indicating the maximum frequency contained in the injector
* wavelet. Notice that this is the maximum frequency, which is not necessarily
* the peak frequency(often used and defined as source frequency).
*/
virtual float GetMaxFrequency() = 0;
};
}//namespace components
}//namespace operations
#endif // OPERATIONS_LIB_COMPONENTS_SOURCE_INJECTOR_HPP
| 3,854
|
C++
|
.h
| 92
| 31.804348
| 97
| 0.613127
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,373
|
ModelHandler.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/SeismicOperations/include/operations/components/independents/primitive/ModelHandler.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of SeismicToolbox.
*
* SeismicToolbox is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SeismicToolbox is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPERATIONS_LIB_COMPONENTS_MODEL_HANDLER_HPP
#define OPERATIONS_LIB_COMPONENTS_MODEL_HANDLER_HPP
#include <string>
#include <vector>
#include <map>
#include <operations/components/independents/interface/Component.hpp>
#include <operations/components/independents/primitive/ComputationKernel.hpp>
#include <operations/common/DataTypes.h>
#include <operations/data-units/concrete/migration/MigrationData.hpp>
namespace operations {
namespace components {
/**
* @brief Model Handler Interface. All concrete techniques for loading
* or setting models should be implemented using this interface.
*/
class ModelHandler : public Component {
public:
/**
* @brief Destructors should be overridden to ensure correct memory management.
*/
virtual ~ModelHandler() {};
/**
* @brief This function should do the following:
* <ul>
* <li>
* Create a new GridBox with all its frames
* (previous, current, next) allocated in memory.
* </li>
* <li>
* The models are loaded into the frame.
* </li>
* <li>
* This should account for the allocation of the boundaries around
* our domain(top, bottom, left, right).
* </li>
* <li>
* It should set all possible GridBox properties to be ready for
* actual computations.
* </li>
* </ul>
*
* @param[in] files_names
* The filenames vector of the files containing the model, the first filename
* in the vector should be the velocity file, the second should be the density
* file name.
*
* @param[in] apComputationKernel
* The computation kernel to be used for first touch.
*
* @return[out]
* GridBox object that was allocated, and setup appropriately.
*/
virtual dataunits::GridBox *ReadModel(std::map<std::string, std::string> files_names) = 0;
/**
* @brief Setup the window properties if needed by copying the
* needed window from the full model.
*/
virtual void SetupWindow() = 0;
/**
* @brief
* Prepares the output migration data to be returned to the user.
* Eg: undoing everything the model handler has, from padding addtions
* to resampling.
*
* @param[in] apMigrationData
* The migration data generated to be post processed.
*/
virtual void PostProcessMigration(dataunits::MigrationData *apMigrationData) = 0;
};
}//namespace components
}//namespace operations
#endif // OPERATIONS_LIB_COMPONENTS_MODEL_HANDLER_HPP
| 3,813
|
C++
|
.h
| 90
| 33.044444
| 102
| 0.60948
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,374
|
TraceManager.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/SeismicOperations/include/operations/components/independents/primitive/TraceManager.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of SeismicToolbox.
*
* SeismicToolbox is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SeismicToolbox is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPERATIONS_LIB_COMPONENTS_TRACE_MANAGER_HPP
#define OPERATIONS_LIB_COMPONENTS_TRACE_MANAGER_HPP
#include <string>
#include <vector>
#include <operations/components/independents/interface/Component.hpp>
#include <operations/common/DataTypes.h>
#include <operations/data-units/concrete/holders/TracesHolder.hpp>
namespace operations {
namespace components {
/**
* @brief Trace Manager Interface.
* All concrete techniques for reading, pre-processing and injecting
* the traces corresponding to a model should be implemented using
* this interface.
*/
class TraceManager : public Component {
public:
/**
* @brief Destructors should be overridden to ensure correct memory management.
*/
virtual ~TraceManager() {};
/**
* @brief Function that should read the traces for a specified shot,
* and form the trace grid appropriately.
*
* @param[in] files_names
* A vector of files' names containing all the shots files.
*
* @param[in] shot_number
* The shot number or id of the shot that its traces are targeted to be read.
*
* @param[in] sort_key
* The type of sorting to access the data in.
*/
virtual void ReadShot(std::vector<std::string> files_names,
uint shot_number, std::string sort_key) = 0;
/**
* @brief Function that should be possible for the pre-processing of the shot traces
* already read. Pre-processing includes interpolation of the traces, any type
* of muting or special pre-processing applied on the traces and setting the
* number of time steps of the simulation appropriately. Any changes needed to
* be applied on the meta data of the grid should be done.
*/
virtual void PreprocessShot() = 0;
/**
* @brief Function that injects traces into the current frame of our GridBox
* according to the time step to be used. this function is used in the
* backward propagation
*
* @param[in] time_step
* The times_step of the current frame in our GridBox object.
* Starts from nt - 1 with this being the time of the first trace
* i.e. (backward propagation starts from nt - 1)
*/
virtual void ApplyTraces(int time_step) = 0;
/**
* @brief Applies Isotropic Field upon all parameters' models
*
* @see ComputationParameters->GetIsotropicRadius()
*/
virtual void ApplyIsotropicField() = 0;
/**
* @brief Reverts Isotropic Field upon all parameters' models
*
* @see ComputationParameters->GetIsotropicRadius()
*/
virtual void RevertIsotropicField() = 0;
/**
* @brief Getter to the property containing the shot location source
* point of the current read traces.
* This value should be set in the ReadShot function.
*
* @return[out]
* A pointer to a Point3D that indicates the source point.
* Point3D is a Point coordinates in 3D.
*/
virtual Point3D *GetSourcePoint() = 0;
/**
* @return[out]
* Pointer containing the information and values of the traces to be injected.
* Dimensions should be in this order as follows:
* <ul>
* <li>
* majority[time][y-dimension][x-dimension].
* </li>
* <li>
* Traces: Structure containing the available traces information.
* </li>
* <ul>
*/
virtual dataunits::TracesHolder *GetTracesHolder() = 0;
/**
* @brief Get the shots that you can be migrated from the data according
* to a min/max and type.
*
* @param[in] files_names
* Files containing the traces.
*
* @param[in] min_shot
* Minimum shot ID to allow.
*
* @param[in] max_shot
* Maximum shot ID to allow.
*
* @param[in] type
* Can be "CDP" or "CSR"
*
* @return[out]
* Vector containing the shot IDs.
*/
virtual std::vector<uint> GetWorkingShots(std::vector<std::string> files_names,
uint min_shot, uint max_shot,
std::string type) = 0;
};
}//namespace components
}//namespace operations
#endif // OPERATIONS_LIB_COMPONENTS_TRACE_MANAGER_HPP
| 5,852
|
C++
|
.h
| 135
| 31.62963
| 96
| 0.573558
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,375
|
ComputationKernel.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/SeismicOperations/include/operations/components/independents/primitive/ComputationKernel.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of SeismicToolbox.
*
* SeismicToolbox is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SeismicToolbox is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPERATIONS_LIB_COMPONENTS_COMPUTATION_KERNEL_HPP
#define OPERATIONS_LIB_COMPONENTS_COMPUTATION_KERNEL_HPP
#include <operations/components/independents/interface/Component.hpp>
#include <operations/components/dependents/primitive/MemoryHandler.hpp>
#include <operations/common/DataTypes.h>
#include "BoundaryManager.hpp"
namespace operations {
namespace components {
/**
* The different kernel modes supported by the computation kernels.
*/
enum class KERNEL_MODE {
FORWARD,
INVERSE,
ADJOINT
};
/**
* @brief Computation Kernel Interface. All concrete techniques for
* solving different wave equations should be implemented using this interface.
*/
class ComputationKernel : public Component {
public:
/**
* @brief Destructors should be overridden to ensure correct memory management.
*/
virtual ~ComputationKernel() {};
/**
* @brief This function should solve the wave equation. It calculates the next
* time step from previous and current frames.
* <br>
* It should also update the GridBox structure so that after the function call,
* the GridBox structure current frame should point to the newly calculated result,
* the previous frame should point to the current frame at the time of the
* function call. The next frame should point to the previous frame at the time of
* the function call.
*/
virtual void Step() = 0;
/**
* @brief Set kernel boundary manager to be used and called internally.
*
* @param[in] apBoundaryManager
* The boundary manager to be used.
*/
void SetBoundaryManager(BoundaryManager *apBoundaryManager) {
this->mpBoundaryManager = apBoundaryManager;
}
/**
* @return[out] The memory handler used.
*/
virtual MemoryHandler *GetMemoryHandler() {
return this->mpMemoryHandler;
}
/**
* @brief
* The operating mode of the kernel.
*
* @param[in] aMode
* The mode to run the kernel in.
*/
virtual void SetMode(KERNEL_MODE aMode) {
this->mMode = aMode;
if (this->mpBoundaryManager != nullptr) {
if (this->mMode == KERNEL_MODE::ADJOINT) {
this->mpBoundaryManager->SetAdjoint(true);
} else {
this->mpBoundaryManager->SetAdjoint(false);
}
}
}
/**
* @brief All pre-processing needed to be done on the model before the
* beginning of the computations, should be applied in this function.
* It should do all pre-processing it needs to perform its operations.
*/
virtual void PreprocessModel() = 0;
protected:
/// Boundary Manager instance to be used by the step function.
BoundaryManager *mpBoundaryManager;
/// Memory Handler instance to be used for all memory
/// handling (i.e. First touch)
MemoryHandler *mpMemoryHandler;
/// The kernel operating mode.
KERNEL_MODE mMode;
};
}//namespace components
}//namespace operations
#endif // OPERATIONS_LIB_COMPONENTS_COMPUTATION_KERNEL_HPP
| 4,445
|
C++
|
.h
| 105
| 31.809524
| 95
| 0.610264
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,376
|
TracesHolder.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/SeismicOperations/include/operations/data-units/concrete/holders/TracesHolder.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of SeismicToolbox.
*
* SeismicToolbox is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SeismicToolbox is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPERATIONS_LIB_DATA_UNITS_TRACES_HOLDER_HPP
#define OPERATIONS_LIB_DATA_UNITS_TRACES_HOLDER_HPP
#include <operations/data-units/interface/DataUnit.hpp>
#include <operations/common/DataTypes.h>
#include <operations/data-units/concrete/holders/FrameBuffer.hpp>
namespace operations {
namespace dataunits {
/**
* @brief Class containing the available traces information.
*/
class TracesHolder : public DataUnit {
public:
/**
* @brief Constructor.
*/
TracesHolder() {
Traces = nullptr;
PositionsX = nullptr;
PositionsY = nullptr;
}
/**
* @brief Destructor.
*/
~TracesHolder() override = default;
public:
dataunits::FrameBuffer<float> *Traces;
uint *PositionsX;
uint *PositionsY;
uint ReceiversCountX;
uint ReceiversCountY;
uint TraceSizePerTimeStep;
uint SampleNT;
float SampleDT;
};
} //namespace dataunits
} //namespace operations
#endif //OPERATIONS_LIB_DATA_UNITS_TRACES_HOLDER_HPP
| 1,980
|
C++
|
.h
| 55
| 28.654545
| 76
| 0.655875
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,377
|
FrameBuffer.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/SeismicOperations/include/operations/data-units/concrete/holders/FrameBuffer.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of SeismicToolbox.
*
* SeismicToolbox is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SeismicToolbox is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPERATIONS_LIB_DATA_UNITS_FRAMEBUFFER_HPP
#define OPERATIONS_LIB_DATA_UNITS_FRAMEBUFFER_HPP
#include <string>
#include <operations/data-units/interface/DataUnit.hpp>
#include <operations/common/DataTypes.h>
namespace operations {
namespace dataunits {
template<typename T>
class FrameBuffer : public DataUnit {
public:
FrameBuffer();
explicit FrameBuffer(uint aSize);
~FrameBuffer() override;
void
Allocate(uint aSize, const std::string &aName = "");
void
Allocate(uint aSize, HALF_LENGTH aHalfLength, const std::string &aName = "");
void
Free();
T *
GetNativePointer();
T *
GetHostPointer();
T *
GetDiskFlushPointer();
void
SetNativePointer(T *pT);
void
ReflectOnNative();
private:
T *mpDataPointer;
T *mpHostDataPointer;
uint mAllocatedBytes;
};
namespace Device {
enum CopyDirection : short {
COPY_HOST_TO_HOST,
COPY_HOST_TO_DEVICE,
COPY_DEVICE_TO_HOST,
COPY_DEVICE_TO_DEVICE,
COPY_DEFAULT
};
void MemSet(void *apDst, int aVal, uint aSize);
void MemCpy(void *apDst, const void *apSrc, uint aSize, CopyDirection aCopyDirection = COPY_DEFAULT);
}
} //namespace dataunits
} //namespace operations
#endif //OPERATIONS_LIB_DATA_UNITS_FRAMEBUFFER_HPP
| 2,390
|
C++
|
.h
| 66
| 27.742424
| 113
| 0.63151
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,378
|
GridBox.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/SeismicOperations/include/operations/data-units/concrete/holders/GridBox.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of SeismicToolbox.
*
* SeismicToolbox is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SeismicToolbox is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPERATIONS_LIB_DATA_UNITS_GRID_BOX_HPP
#define OPERATIONS_LIB_DATA_UNITS_GRID_BOX_HPP
#include <iostream>
#include <map>
#include <vector>
#include <cstring>
#include <bs/base/exceptions/Exceptions.hpp>
#include <bs/io/data-units/concrete/Gather.hpp>
#include <operations/data-units/concrete/holders/axis/concrete/Axis3D.hpp>
#include <operations/data-units/interface/DataUnit.hpp>
#include <operations/common//DataTypes.h>
#include "FrameBuffer.hpp"
using namespace operations::dataunits::axis;
namespace operations {
namespace dataunits {
/**
* @tableofcontents
* - Brief
* - Keys Description
* - Keys
*
* @brief
* Grid box holds all the meta data (i.e. dt, nt, grid size, window
* size, window start, reference point and cell dimensions) needed
* by all components.
*
* It also holds all wave fields, parameters and parameters window
* in member maps included in this class.
*
* Keys to all maps are of type u_int16_t thus 16 bits are needed for
* the key to be constructed. These 16 bits are constructed as same as
* Unix commands
*
* @example: (PARM | CURR | DIR_X) meaning that this element is a parameter
* which have current time step and in the x direction.
*
* Keys are discussed more below.
*
* @note Using this class should not mess up with the bit mask
*
* @keysdescription
* - Bit 0:
* Identifies an element is a window or not.
* - Bit 1,2:
* Identifies an element is a wave field or a parameter.
* * WAVE 01
* * PARM 10
* - Bit 3,4,5:
* Identifies an element's time, whether it's current, next or previous.
* * CURR 001
* * PREV 010
* * NEXT 011
* - Bit 6,7:
* Identifies an element's direction. X,Y or Z.
* * DIR_Z 00
* * DIR_X 01
* * DIR_Y 10
* - Bit 8,9,10,11,12,13:
* Identifies an element's direction. X,Y or Z.
* * GB_VEL 000001
* * GB_DLT 000010
* * GB_EPS 000011
* * GB_THT 000100
* * GB_PHI 000101
* * GB_DEN 000111
* - Bit 14,15:
* Parity bits.
*
*
* @keys
*
* WINDOW 1 00 000 00 000000 00
*
* WAVE FIELD 0 01 000 00 000000 00
* PARAMETER 0 10 000 00 000000 00
*
* CURRENT 0 00 001 00 000000 00
* PREVIOUS 0 00 010 00 000000 00
* NEXT 0 00 011 00 000000 00
*
* DIRECTION Z 0 00 000 00 000000 00
* DIRECTION X 0 00 000 01 000000 00
* DIRECTION Y 0 00 000 10 000000 00
*
* VELOCITY 0 00 000 00 000001 00
* DELTA 0 00 000 00 000010 00
* EPSILON 0 00 000 00 000011 00
* THETA 0 00 000 00 000100 00
* PHI 0 00 000 00 000101 00
* DENSITY 0 00 000 00 000111 00
* PARTICLE VELOCITY 0 00 000 00 001000 00
* PRESSURE 0 00 000 00 001001 00
* GB_VEL_RMS 0 00 000 00 001010 00
* GB_VEL_AVG 0 00 000 00 001011 00
* GB_TIME_AVG 0 00 000 00 001100 00
*/
/**
* @note
* Never add definitions to your concrete implementations
* with the same names.
*/
#define WIND 0b1000000000000000
#define WAVE 0b0010000000000000
#define PARM 0b0100000000000000
#define CURR 0b0000010000000000
#define PREV 0b0000100000000000
#define NEXT 0b0000110000000000
#define DIR_Z 0b0000000000000000
#define DIR_X 0b0000000100000000
#define DIR_Y 0b0000001000000000
#define GB_VEL 0b0000000000000100
#define GB_DLT 0b0000000000001000
#define GB_EPS 0b0000000000001100
#define GB_THT 0b0000000000010000
#define GB_PHI 0b0000000000010100
#define GB_DEN 0b0000000000011100
#define GB_PRTC 0b0000000000100000
#define GB_PRSS 0b0000000000100100
#define GB_VEL_RMS 0b0000000000101000
#define GB_VEL_AVG 0b0000000000101100
#define GB_TIME_AVG 0b0000000000110000
/**
* @brief
* Grid box holds all the meta data (i.e. dt, nt, grid size, window
* size, window start, reference point and cell dimensions) needed
* by all components.
*
* It also holds all wave fields, parameters and parameters window
* in member maps included in this class.
*/
class GridBox : public DataUnit {
public:
typedef u_int16_t Key;
public:
/**
* @brief Constructor
*/
GridBox();
/**
* @brief Define the destructor as virtual which is a member function
* that is declared within a base class and re-defined (Overridden)
* by a derived class default = {}
*/
~GridBox() override;
/**
* @brief DT setter.
* @throw ILLOGICAL_EXCEPTION()
*/
void SetDT(float _dt);
/**
* @brief DT getter.
*/
inline float GetDT() const {
return this->mDT;
}
/**
* @brief NT setter.
* @throw ILLOGICAL_EXCEPTION()
*/
void SetNT(float _nt);
/**
* @brief NT getter.
*/
inline uint GetNT() const {
return this->mNT;
}
/**
* @brief WindowProperties struct getter.
* @return[out] WindowProperties Value
*/
inline WindowProperties *GetWindowProperties() {
return this->mpWindowProperties;
}
/**
* @brief Window start per axe setter.
* @param[in] axis Axe direction
* @param[in] val Value to be set
* @throw ILLOGICAL_EXCEPTION()
*/
void SetWindowStart(uint axis, uint val);
/**
* @brief Window start per axe getter.
* @param[in] axis Axe direction
* @return[out] value Value
*/
uint GetWindowStart(uint axis);
/**
* @brief Window start struct getter.
*/
Point3D *GetWindowStart() {
return &this->mpWindowProperties->window_start;
}
/**
* @brief Initial Size Setter
* @param[in] ptr_parameter_axis3D Allocated parameter pointer
*/
inline void SetInitialAxis(Axis3D<unsigned int> *apInitialAxis) {
this->mpInitialAxis = apInitialAxis;
}
/**
* @brief Initial Axis getter.
* @return[out] Axis3D Value
*/
inline Axis3D<unsigned int> *GetInitialAxis() {
return this->mpInitialAxis;
}
/**
* @brief After Sampling Axis Setter
* @param[in] ptr_parameter_axis3D Allocated parameter pointer
*/
inline void SetAfterSamplingAxis(Axis3D<unsigned int> *apAfterSamplingAxis) {
this->mpAfterSamplingAxis = apAfterSamplingAxis;
}
/**
* @brief After Sampling Axis getter.
* @return[out] Axis3D Value
*/
inline Axis3D<unsigned int> *GetAfterSamplingAxis() {
return this->mpAfterSamplingAxis;
}
/**
* @brief Window Size Setter
* @param[in] ptr_parameter_axis3D Allocated parameter pointer
*/
inline void SetWindowAxis(Axis3D<unsigned int> *apWindowAxis) {
this->mpWindowAxis = apWindowAxis;
}
/**
* @brief Window size getter.
* @return[out] Axis3D Value
*/
inline Axis3D<unsigned int> *GetWindowAxis() {
return this->mpWindowAxis;
}
/**
* @brief Registers an allocated wave field pointer and it's
* window pointer accompanied with it's value.
* @param[in] key Wave field name
* @param[in] ptr_wave_field Allocated wave field pointer
*/
void RegisterWaveField(u_int16_t key, FrameBuffer<float> *ptr_wave_field);
/**
* @brief Registers an allocated parameter pointer
* accompanied with it's value.
* @param[in] key Parameter name
* @param[in] ptr_parameter Allocated parameter pointer
* @param[in] ptr_parameter_window Allocated parameter window pointer
*/
void RegisterParameter(u_int16_t key,
FrameBuffer<float> *ptr_parameter,
FrameBuffer<float> *ptr_parameter_window = nullptr);
/**
* @brief Master wave field setter.
* @return[out] float *
*/
void RegisterMasterWaveField();
/**
* @brief Wave Fields map getter.
* @return[out] this->mWaveField
*/
inline std::map<u_int16_t, FrameBuffer<float> *> GetWaveFields() {
return this->mWaveFields;
}
/**
* @brief Parameters map getter.
* @return[out] this->mParameters
*/
inline std::map<u_int16_t, FrameBuffer<float> *> GetParameters() {
return this->mParameters;
}
/**
* @brief Window Parameters map getter.
* @return[out] this->mWindowParameters
*/
inline std::map<u_int16_t, FrameBuffer<float> *> GetWindowParameters() {
return this->mWindowParameters;
}
/**
* @brief Master wave field getter.
* @return[out] float *
*/
float *GetMasterWaveField();
/**
* @brief WaveField/Parameter/WindowParameter getter.
* @param[in] key Key
* @return[out] float * (Parameter | Wave field | Window Parameter) pointer
* @throw NO_KEY_FOUND_EXCEPTION()
*/
FrameBuffer<float> *Get(u_int16_t key);
/**
* @brief WaveField/Parameter/WindowParameter setter.
* @param[in] key Key
* @param[in] val FrameBuffer
* @throw NO_KEY_FOUND_EXCEPTION()
*/
void Set(u_int16_t key, FrameBuffer<float> *val);
/**
* @brief WaveField/Parameter/WindowParameter setter.
* @param[in] key Key
* @param[in] val float pointer
* @throw NO_KEY_FOUND_EXCEPTION()
*/
void Set(u_int16_t key, float *val);
/**
* @brief WaveField/Parameter/WindowParameter value re-setter.
* @param[in] key Key
* @note Uses normal setter with a nullptr set value.
*/
void Reset(u_int16_t key);
/**
* @brief Swaps two pointers with respect to the provided keys.
* @param[in] _src
* @param[in] _dst
* @throw NO_KEY_FOUND_EXCEPTION()
*/
void Swap(u_int16_t _src, u_int16_t _dst);
/**
* @brief Clones current grid box into the sent grid box.
*
* @param[in] apGridBox
* GridBox to clone in.
*/
void Clone(GridBox *apGridBox);
/**
* @brief Clones current grid box's meta data into
* the sent grid box.
*
* @param[in] apGridBox
* GridBox to clone in.
*/
void CloneMetaData(GridBox *apGridBox);
/**
* @brief Clones current grid box's wave fields into
* the sent grid box.
*
* @param[in] apGridBox
* GridBox to clone in.
*
* @note Same pointers for registry are used.
*/
void CloneWaveFields(GridBox *apGridBox);
/**
* @brief Clones current grid box's parameters into
* the sent grid box.
*
* @param[in] apGridBox
* GridBox to clone in.
*
* @note Same pointers for registry are used.
*/
void CloneParameters(GridBox *apGridBox);
/**
* @brief Report all current grid box inner values.
* @param[in] aReportLevel
*/
void Report(REPORT_LEVEL aReportLevel = SIMPLE);
/**
* @brief WaveField/Parameter/WindowParameter checker.
* @param[in] key Key
* @return[out] boolean
*
*/
bool Has(u_int16_t key);
/**
* @brief
* Set the gather for the parameter header values, to an appropriate to
* utilize to get the appropriate headers.
*
* @param[in] apParameterHeaderGather
* A provided header gather.
*/
void SetParameterGatherHeader(bs::io::dataunits::Gather *apParameterHeaderGather) {
this->mpParameterHeadersGather = apParameterHeaderGather;
}
/**
* @brief
* Return the gather containing the appropriate headers
* for any parameter field.
*
* @return
* Pointer to gather containing all the needed headers
* for a parameter field.
*/
bs::io::dataunits::Gather *GetParameterGatherHeader() {
return this->mpParameterHeadersGather;
}
public:
/**
* @param[in] key
* @param[in] mask
* @return[out] bool is the mask included in the key.
*/
static bool inline Includes(u_int16_t key, u_int16_t mask) {
return (key & mask) == mask;
}
/**
* @brief Masks source bits by provided mask bits.
* @param[in,out] key
* @param[in] _src
* @param[in] _dest
*/
static void Replace(u_int16_t *key, u_int16_t _src, u_int16_t _dest);
/**
* @brief Converts a given key (i.e. u_int16_t) to string.
* @param[in] key
* @return[out] String value
*/
static std::string Stringify(u_int16_t key);
std::string Beautify(std::string str);
private:
/**
* @brief Bit setter
* @param[in] key
* @param[in] type
*/
static void inline SetBits(u_int16_t *key, u_int16_t type) {
*key |= type;
}
/**
* @brief Convert first letter in string to uppercase
* @paramp[in] str to be capitalized
* @return[out] capitalized string
*/
std::string Capitalize(std::string str);
/**
* @brief Replace all occurrences of a character in string
* @paramp[in] str to be operated on
* @paramp[in] str to be changed from
* @paramp[in] str to be changed to
* @return[out] replaced string
*/
std::string ReplaceAll(std::string str,
const std::string &from,
const std::string &to);
private:
/// Wave field map
std::map<u_int16_t, FrameBuffer<float> *> mParameters;
/// Parameters map
std::map<u_int16_t, FrameBuffer<float> *> mWindowParameters;
/// Window Parameters map
std::map<u_int16_t, FrameBuffer<float> *> mWaveFields;
/// Initial Size
Axis3D<unsigned int> *mpInitialAxis;
/// Size of the After Sampling
Axis3D<unsigned int> *mpAfterSamplingAxis;
/// Size of the Window
Axis3D<unsigned int> *mpWindowAxis;
/// WindowProperties
WindowProperties *mpWindowProperties;
/// Time-step size.
float mDT;
/// Number of time steps.
uint mNT;
/// Parameter headers(Used to restate the headers of any parameter field).
bs::io::dataunits::Gather *mpParameterHeadersGather;
};
} //namespace dataunits
} //namespace operations
#endif //OPERATIONS_LIB_DATA_UNITS_GRID_BOX_HPP
| 18,106
|
C++
|
.h
| 477
| 27.614256
| 95
| 0.522704
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,379
|
RegularAxis.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/SeismicOperations/include/operations/data-units/concrete/holders/axis/concrete/RegularAxis.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of SeismicToolbox.
*
* SeismicToolbox is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SeismicToolbox is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPERATIONS_LIB_DATA_UNITS_AXIS_REGULAR_AXIS_HPP
#define OPERATIONS_LIB_DATA_UNITS_AXIS_REGULAR_AXIS_HPP
#include <operations/data-units/concrete/holders/axis/interface/Axis.hpp>
namespace operations {
namespace dataunits {
namespace axis {
/**
* @brief A Class to hold the metadata of an axis.
* It uses regular sampling.
* Template class, allowed data types are unsigned short, unsigned int, unsigned long.
*/
template<typename T>
class RegularAxis : public Axis<T> {
public:
/**
* @brief Default constructor.
*
* @note This should not be modified or deleted as it is needed
* for explicit instantiation without pointers.
*/
RegularAxis() = default;
/**
* @brief explicit Default constructor.
*/
explicit RegularAxis(T mAxisSize);
/**
* @brief Copy constructor.
*/
RegularAxis(const RegularAxis &aRegularAxis);
/**
* @brief Default destructor.
*/
~RegularAxis() = default;
/**
* @brief Overloading the assignment operator
*/
RegularAxis<T> &operator=(const RegularAxis<T> &aRegularAxis);
int
AddBoundary(int aDirection, T aBoundaryLength) override;
int
AddHalfLengthPadding(int aDirection, T aHalfLengthPadding) override;
int
AddComputationalPadding(int aDirection, T aComputationalPadding) override;
inline int
GetRearHalfLengthPadding() const override { return this->mRearHalfLengthPadding; };
inline int
GetFrontHalfLengthPadding() const override { return this->mFrontHalfLengthPadding; };
inline T
GetRearBoundaryLength() const override { return this->mRearBoundaryLength; };
inline T
GetFrontBoundaryLength() const override { return this->mFrontBoundaryLength; };
inline T
GetRearComputationalPadding() const override { return this->mRearComputationalPadding; };
inline T
GetFrontComputationalPadding() const override { return this->mFrontComputationalPadding; };
inline T
GetAxisSize() const override { return this->mAxisSize; }
inline void
SetCellDimension(float aCellDimension) override { this->mCellDimension = aCellDimension; }
inline float
GetCellDimension() const override { return this->mCellDimension; }
inline void SetReferencePoint(T aReferencePoint) override { this->mReferencePoint = aReferencePoint; }
inline T
GetReferencePoint() const override { return this->mReferencePoint; }
T
GetLogicalAxisSize() override;
T
GetActualAxisSize() override;
T
GetComputationAxisSize() override;
private:
T mAxisSize;
int mFrontHalfLengthPadding;
int mRearHalfLengthPadding;
T mFrontBoundaryLength;
T mRearBoundaryLength;
T mFrontComputationalPadding;
T mRearComputationalPadding;
float mCellDimension;
T mReferencePoint;
};
}
}
}
#endif //OPERATIONS_LIB_DATA_UNITS_AXIS_REGULAR_AXIS_HPP
| 4,594
|
C++
|
.h
| 103
| 31.456311
| 118
| 0.591256
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,380
|
Axis3D.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/SeismicOperations/include/operations/data-units/concrete/holders/axis/concrete/Axis3D.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of SeismicToolbox.
*
* SeismicToolbox is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SeismicToolbox is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPERATIONS_LIB_DATA_UNITS_AXIS_3D_AXIS_HPP
#define OPERATIONS_LIB_DATA_UNITS_AXIS_3D_AXIS_HPP
#include <vector>
#include <operations/data-units/concrete/holders/axis/concrete/RegularAxis.hpp>
namespace operations {
namespace dataunits {
namespace axis {
/**
* @brief An wrapper class to hold the X, Y and Z axis.
*
*/
template<typename T>
class Axis3D {
public:
/**
* @brief Constructor.
*/
Axis3D(T aXSize, T aYSize, T aZSize);
/**
* @brief Copy constructor.
*/
Axis3D(Axis3D &aAxis3D);
/**
* @brief Overloading Assignment Operator.
*/
Axis3D<T> &operator=(Axis3D<T> &aAxis3D);
/**
* @brief Destructor.
*/
~Axis3D();
/**
* @brief Getter for the X axis.
*
* @return
* RegularAxis, The X Axis..
*/
inline RegularAxis<T> &
GetXAxis() { return this->mXAxis; }
/**
* @brief Getter for the Z Length.
*
* @return
* RegularAxis, The Z Length.
*/
inline RegularAxis<T> &
GetZAxis() { return this->mZAxis; }
/**
* @brief Getter for the Y axis.
*
* @return
* RegularAxis, The Y Length.
*/
inline RegularAxis<T> &
GetYAxis() { return this->mYAxis; }
/**
* @brief Setter for the X axis without any additions.
*
* @Param[in] axis size
*
*/
inline void SetXAxis(T aXAxis) { this->mXAxis = RegularAxis<T>(aXAxis); }
/**
* @brief Setter for the Y axis without any additions.
*
* @Param[in] axis size
*
*/
inline void SetYAxis(T aYAxis) { this->mYAxis = RegularAxis<T>(aYAxis); }
/**
* @brief Setter for the Z axis without any additions.
*
* @Param[in] axis size
*
*/
inline void SetZAxis(T aZAxis) { this->mZAxis = RegularAxis<T>(aZAxis); }
/**
* @brief Getter for the vector of axis.
*
* @return
* std::vector, vector of RegularAxis.
*/
inline std::vector<RegularAxis<T> *>
GetAxisVector() { return this->mAxisVector; }
private:
/// Axis for X direction.
RegularAxis<T> mXAxis;
/// Axis for Y direction.
RegularAxis<T> mYAxis;
/// Axis for Z direction.
RegularAxis<T> mZAxis;
/// All directions axes vector.
std::vector<RegularAxis<T> *> mAxisVector;
};
}
}
}
#endif //OPERATIONS_LIB_DATA_UNITS_AXIS_3D_AXIS_HPP
| 4,191
|
C++
|
.h
| 115
| 22.878261
| 89
| 0.479547
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,381
|
Axis.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/SeismicOperations/include/operations/data-units/concrete/holders/axis/interface/Axis.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of SeismicToolbox.
*
* SeismicToolbox is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SeismicToolbox is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPERATIONS_LIB_DATA_UNITS_AXIS_AXIS_HPP
#define OPERATIONS_LIB_DATA_UNITS_AXIS_AXIS_HPP
#include <operations/common/DataTypes.h>
namespace operations {
namespace dataunits {
namespace axis {
/**
* @brief An abstract class to hold the meta-data of each axis.
* Will ease further implementations and development.
* This is a template class, data types can be unsigned short, unsigned int or unsigned long.
*/
template<typename T>
class Axis {
public:
/**
* @brief Function to add boundary to the axis front or rear.
*
* @param[in] aDirection
* The direction where to add the boundary. (OP_DIREC_FRONT or OP_DIREC_REAR)
*
* @param[in] aBoundaryLength
* The length of the boundary to be added.
*
* @return
* int status flag.
*/
virtual int
AddBoundary(int aDirection, T aBoundaryLength) = 0;
/**
* @brief Function to add half length to the axis.
* The same value must be added at both ends.
*
* @param[in] aHalfLengthPadding
* The half length to be added to the axis.
*
* @return
* int status flag.
*/
virtual int
AddHalfLengthPadding(int aDirection, T aHalfLengthPadding) = 0;
/**
* @brief Function to add padding to the axis front or rear.
* Padding differs from one technology to another.
*
* @param[in] aDirection
* The direction where to add the padding. (OP_DIREC_FRONT or OP_DIREC_REAR)
*
* @param[in] aComputationalPadding
* The length of padding to be added.
*
* @return
* int status flag.
*/
virtual int
AddComputationalPadding(int aDirection, T aComputationalPadding) = 0;
/**
* @brief Getter for the Front Half Length/ Non Computational Padding
*
* @return
* int, The front Half Length/ Non Computational Padding
*/
virtual int
GetFrontHalfLengthPadding() const = 0;
/**
* @brief Getter for the Rear Half Length/ Non Computational Padding
*
* @return
* int, The rear Half Length/ Non Computational Padding
*/
virtual int
GetRearHalfLengthPadding() const = 0;
/**
* @brief Getter for the Rear Boundary Length.
*
* @return
* T, The Rear Boundary Length.
*/
virtual T
GetRearBoundaryLength() const = 0;
/**
* @brief Getter for the Front Boundary Length.
*
* @return
* T, The Front Boundary Length.
*/
virtual T
GetFrontBoundaryLength() const = 0;
/**
* @brief Getter for the Rear Computational Padding Length.
*
* @return
* T, The Rear Computational Padding Length.
*/
virtual T
GetRearComputationalPadding() const = 0;
/**
* @brief Getter for the Front Computational Padding Length.
*
* @return
* T, The Front Computational Padding Length.
*/
virtual T
GetFrontComputationalPadding() const = 0;
/**
* @brief Setter for the Cell Dimension without any additions.
*
* @Param[in] aCellDimension
* T, The cell dimension.
*/
virtual void
SetCellDimension(float aCellDimension) = 0;
/**
* @brief Getter for the Cell Dimension without any additions.
*
* @return
* T, The axis size.
*/
virtual float
GetCellDimension() const = 0;
/**
* @brief Setter for the Reference Point.
*
* @Param[in] aReferencePoint
* T, The Reference Point.
*/
virtual void
SetReferencePoint(T aReferencePoint) = 0;
/**
* @brief Getter for the Reference point without any additions.
*
* @return
* T, The axis size.
*/
virtual T
GetReferencePoint() const = 0;
/**
* @brief Getter for the original Axis Size without any additions.
*
* @return
* T, The axis size.
*/
virtual T
GetAxisSize() const = 0;
/**
* @brief Getter for the Logical Axis Size.
* Logical Axis size = Axis size +
* Front Boundary + Rear Boundary +
* 2 * Half Length
*
* @return
* T, The Logical axis size.
*/
virtual T
GetLogicalAxisSize() = 0;
/**
* @brief Getter for the Actual Axis Size.
* Actual Axis size = Axis size +
* Front Boundary Length + Rear Boundary Length +
* 2 * Half Length +
* Front Padding + Rear Padding
*
* @return
* T, The Actual axis size.
*/
virtual T
GetActualAxisSize() = 0;
/**
* @brief Getter for the Computation Axis Size.
* Computation Axis size = Axis size +
* Front Boundary Length + Rear Boundary Length +
* Front Padding + Rear Padding
*
* @return
* T, The Computation axis size.
*/
virtual T
GetComputationAxisSize() = 0;
};
}
}
}
#endif //OPERATIONS_LIB_DATA_UNITS_AXIS_AXIS_HPP
| 7,851
|
C++
|
.h
| 200
| 23.765
| 105
| 0.459612
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,382
|
Result.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/SeismicOperations/include/operations/data-units/concrete/migration/Result.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of SeismicToolbox.
*
* SeismicToolbox is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SeismicToolbox is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPERATIONS_LIB_DATA_UNITS_MIGRATION_RESULT_HPP
#define OPERATIONS_LIB_DATA_UNITS_MIGRATION_RESULT_HPP
namespace operations {
namespace dataunits {
class Result {
public:
/**
* @brief Constructor
*/
explicit Result(float *data) {
this->mpData = data;
};
/**
* @brief Destructor.
*/
~Result() = default;
float *GetData() {
return this->mpData;
}
void SetData(float *data) {
mpData = data;
}
private:
float *mpData;
};
} //namespace dataunits
} //namespace operations
#endif //OPERATIONS_LIB_DATA_UNITS_MIGRATION_RESULT_HPP
| 1,555
|
C++
|
.h
| 46
| 26.608696
| 76
| 0.632911
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,383
|
MigrationData.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/SeismicOperations/include/operations/data-units/concrete/migration/MigrationData.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of SeismicToolbox.
*
* SeismicToolbox is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SeismicToolbox is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPERATIONS_LIB_DATA_UNITS_MIGRATION_MIGRATION_DATA_HPP
#define OPERATIONS_LIB_DATA_UNITS_MIGRATION_MIGRATION_DATA_HPP
#include <utility>
#include <vector>
#include <bs/base/exceptions/Exceptions.hpp>
#include <bs/io/data-units/concrete/Gather.hpp>
#include <operations/data-units/interface/DataUnit.hpp>
#include <operations/data-units/concrete/migration/Result.hpp>
#include <operations/common/DataTypes.h>
namespace operations {
namespace dataunits {
class MigrationData : public DataUnit {
public:
/**
* @brief Constructor
* @param[in] mig_type
* @param[in] nx
* @param[in] nz
* @param[in] ny
* @param[in] nt
* @param[in] dx
* @param[in] dz
* @param[in] dy
* @param[in] dt
* @param[in] avResults
*/
MigrationData(uint nx, uint ny, uint nz,
float dx, float dy, float dz,
bs::io::dataunits::Gather *apMetadataGather,
std::vector<Result *> avResults) :
MigrationData(nx, ny, nz, 1, dx, dy, dz,
apMetadataGather, std::move(avResults)) {
}
MigrationData(uint nx, uint ny, uint nz,
uint gather_dimension,
float dx, float dy, float dz,
bs::io::dataunits::Gather *apMetadataGather,
std::vector<Result *> avResults) {
this->mNX = nx;
this->mNY = ny;
this->mNZ = nz;
this->mDX = dx;
this->mDY = dy;
this->mDZ = dz;
this->mpMetadataGather = apMetadataGather;
this->mvResults = std::move(avResults);
this->mGatherDimension = gather_dimension;
}
/**
* @brief Destructor.
*/
~MigrationData() override {
for (auto const &result : this->mvResults) {
delete result;
}
}
/**
* @brief Grid size per axe getter.
* @param[in] axis Axe direction
* @return[out] value Value
*/
uint GetGridSize(uint axis) const {
if (bs::base::exceptions::is_out_of_range(axis)) {
throw bs::base::exceptions::AXIS_EXCEPTION();
}
uint val;
if (axis == Y_AXIS) {
val = this->mNY;
} else if (axis == Z_AXIS) {
val = this->mNZ;
} else if (axis == X_AXIS) {
val = this->mNX;
}
return val;
}
/**
* @brief Cell dimensions per axe getter.
* @param[in] axis Axe direction
* @return[out] value Value
*/
float GetCellDimensions(uint axis) const {
if (bs::base::exceptions::is_out_of_range(axis)) {
throw bs::base::exceptions::AXIS_EXCEPTION();
}
float val;
if (axis == Y_AXIS) {
val = this->mDY;
} else if (axis == Z_AXIS) {
val = this->mDZ;
} else if (axis == X_AXIS) {
val = this->mDX;
}
return val;
}
/**
* @brief Grid size per axe setter.
* @param[in] axis Axe direction
* @param[in] value Value
*/
void SetGridSize(uint axis, uint value) {
if (bs::base::exceptions::is_out_of_range(axis)) {
throw bs::base::exceptions::AXIS_EXCEPTION();
}
if (axis == Y_AXIS) {
this->mNY = value;
} else if (axis == Z_AXIS) {
this->mNZ = value;
} else if (axis == X_AXIS) {
this->mNX = value;
}
}
/**
* @brief Cell dimensions per axe getter.
* @param[in] axis Axe direction
* @param[in] value Value
*/
void SetCellDimensions(uint axis, float value) {
if (bs::base::exceptions::is_out_of_range(axis)) {
throw bs::base::exceptions::AXIS_EXCEPTION();
}
if (axis == Y_AXIS) {
this->mDY = value;
} else if (axis == Z_AXIS) {
this->mDZ = value;
} else if (axis == X_AXIS) {
this->mDX = value;
}
}
void SetResults(uint index, Result *apResult) {
this->mvResults[index] = apResult;
}
std::vector<Result *> GetResults() const {
return this->mvResults;
}
Result *GetResultAt(uint index) const {
return this->mvResults[index];
}
uint GetGatherDimension() const {
return this->mGatherDimension;
}
bs::io::dataunits::Gather *GetMetadataGather() const {
return this->mpMetadataGather;
}
private:
uint mNX;
uint mNY;
uint mNZ;
float mDX;
float mDY;
float mDZ;
bs::io::dataunits::Gather *mpMetadataGather;
std::vector<Result *> mvResults;
/**
* @brief The extra dimension is supposed to carry the number of angles in angle
* domain common image gathers or number of offsets in offset domain common
* image gathers, etc
*/
uint mGatherDimension;
};
} //namespace dataunits
} //namespace operations
#endif // OPERATIONS_LIB_DATA_UNITS_MIGRATION_MIGRATION_DATA_HPP
| 6,948
|
C++
|
.h
| 180
| 24.916667
| 91
| 0.48724
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,384
|
DataUnit.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/SeismicOperations/include/operations/data-units/interface/DataUnit.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of SeismicToolbox.
*
* SeismicToolbox is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SeismicToolbox is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPERATIONS_LIB_DATA_UNIT_HPP
#define OPERATIONS_LIB_DATA_UNIT_HPP
namespace operations {
namespace dataunits {
enum REPORT_LEVEL {
SIMPLE, VERBOSE
};
class DataUnit {
public:
/**
* @brief Destructors should be overridden to ensure correct memory management.
*/
virtual ~DataUnit() {};
};
} //namespace dataunits
} //namespace operations
#endif //OPERATIONS_LIB_DATA_UNIT_HPP
| 1,255
|
C++
|
.h
| 35
| 31.114286
| 91
| 0.703125
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,385
|
RTMEngineConfigurations.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/SeismicOperations/include/operations/engine-configurations/concrete/RTMEngineConfigurations.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of SeismicToolbox.
*
* SeismicToolbox is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SeismicToolbox is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPERATIONS_LIB_ENGINE_CONFIGURATIONS_RTM_ENGINE_CONFIGURATION_HPP
#define OPERATIONS_LIB_ENGINE_CONFIGURATIONS_RTM_ENGINE_CONFIGURATION_HPP
#include <operations/engine-configurations/interface/EngineConfigurations.hpp>
#include <operations/components/independents/primitive/BoundaryManager.hpp>
#include <operations/components/independents/primitive/ComputationKernel.hpp>
#include <operations/components/independents/primitive/MigrationAccommodator.hpp>
#include <operations/components/independents/primitive/ForwardCollector.hpp>
#include <operations/components/independents/primitive/ModelHandler.hpp>
#include <operations/components/independents/primitive/SourceInjector.hpp>
#include <operations/components/independents/primitive/TraceManager.hpp>
#include <operations/components/dependents/primitive/MemoryHandler.hpp>
namespace operations {
namespace configurations {
/**
* @example
* Example of RTM Engine:
* <ol>
* <li>
* In case of one shot used: take the output of the modelling
* engine (trace_file) as an input and the velocity file and
* generates the results.
* </li>
* <li>
* In case of different shots used: take the output of the
* modelling engine (trace_files) as a std::vector as input and
* the velocity file and generates the results.
* </li>
* <ol>
*/
/**
* @brief Class that contains pointers to concrete
* implementations of each component to be used in the RTM framework engine.
*/
class RTMEngineConfigurations : public EngineConfigurations {
public:
/**
* @brief Constructor
**/
RTMEngineConfigurations() {
this->mpForwardCollector = nullptr;
this->mpModelHandler = nullptr;
this->mpBoundaryManager = nullptr;
this->mpSourceInjector = nullptr;
this->mpComputationKernel = nullptr;
this->mpMigrationAccommodator = nullptr;
this->mpTraceManager = nullptr;
this->mpMemoryHandler = nullptr;
this->mSortMin = -1;
this->mSortMax = -1;
}
/**
* @brief Destructor for correct destroying of the pointers
**/
~RTMEngineConfigurations() override {
delete mpForwardCollector;
delete mpModelHandler;
delete mpBoundaryManager;
delete mpSourceInjector;
delete mpComputationKernel;
delete mpMigrationAccommodator;
delete mpTraceManager;
delete mpMemoryHandler;
}
inline components::ForwardCollector *GetForwardCollector() const {
return this->mpForwardCollector;
}
void SetForwardCollector(components::ForwardCollector *apForwardCollector) {
this->mpForwardCollector = apForwardCollector;
this->mpComponentsMap->Set(FORWARD_COLLECTOR, this->mpForwardCollector);
}
inline components::ModelHandler *GetModelHandler() const {
return this->mpModelHandler;
}
void SetModelHandler(components::ModelHandler *apModelHandler) {
this->mpModelHandler = apModelHandler;
this->mpComponentsMap->Set(MODEL_HANDLER, this->mpModelHandler);
}
inline components::BoundaryManager *GetBoundaryManager() const {
return this->mpBoundaryManager;
}
void SetBoundaryManager(components::BoundaryManager *apBoundaryManager) {
this->mpBoundaryManager = apBoundaryManager;
this->mpComponentsMap->Set(BOUNDARY_MANAGER, this->mpBoundaryManager);
}
inline components::SourceInjector *GetSourceInjector() const {
return this->mpSourceInjector;
}
void SetSourceInjector(components::SourceInjector *apSourceInjector) {
this->mpSourceInjector = apSourceInjector;
this->mpComponentsMap->Set(SOURCE_INJECTOR, this->mpSourceInjector);
}
inline components::ComputationKernel *GetComputationKernel() const {
return this->mpComputationKernel;
}
void SetComputationKernel(components::ComputationKernel *apComputationKernel) {
this->mpComputationKernel = apComputationKernel;
this->mpComponentsMap->Set(COMPUTATION_KERNEL, this->mpComputationKernel);
/// Set Memory Handler accordingly.
this->SetMemoryHandler(this->mpComputationKernel->GetMemoryHandler());
}
inline components::MigrationAccommodator *GetMigrationAccommodator() const {
return this->mpMigrationAccommodator;
}
void SetMigrationAccommodator(components::MigrationAccommodator *apMigrationAccommodator) {
this->mpMigrationAccommodator = apMigrationAccommodator;
this->mpComponentsMap->Set(MIGRATION_ACCOMMODATOR, this->mpMigrationAccommodator);
}
inline components::TraceManager *GetTraceManager() const {
return this->mpTraceManager;
}
void SetTraceManager(components::TraceManager *apTraceManager) {
this->mpTraceManager = apTraceManager;
this->mpComponentsMap->Set(TRACE_MANAGER, this->mpTraceManager);
}
inline components::MemoryHandler *GetMemoryHandler() const {
return this->mpMemoryHandler;
}
inline const std::map<std::string, std::string> &GetModelFiles() const {
return mModelFiles;
}
inline void SetModelFiles(const std::map<std::string, std::string> &aModelFiles) {
this->mModelFiles = aModelFiles;
}
inline const std::vector<std::string> &GetTraceFiles() const {
return this->mTraceFiles;
}
inline void SetTraceFiles(const std::vector<std::string> &aTraceFiles) {
this->mTraceFiles = aTraceFiles;
}
inline uint GetSortMin() const {
return this->mSortMin;
}
inline void SetSortMin(uint aSortMin) {
this->mSortMin = aSortMin;
}
inline uint GetSortMax() const {
return this->mSortMax;
}
inline void SetSortMax(uint aSortMax) {
this->mSortMax = aSortMax;
}
inline const std::string &GetSortKey() const {
return this->mSortKey;
}
inline void SetSortKey(const std::string &aSortKey) {
this->mSortKey = aSortKey;
}
private:
void SetMemoryHandler(components::MemoryHandler *apMemoryHandler) {
this->mpMemoryHandler = apMemoryHandler;
this->mpDependentComponentsMap->Set(MEMORY_HANDLER, this->mpMemoryHandler);
}
private:
/* Independent Components */
components::ForwardCollector *mpForwardCollector;
components::ModelHandler *mpModelHandler;
components::BoundaryManager *mpBoundaryManager;
components::SourceInjector *mpSourceInjector;
components::ComputationKernel *mpComputationKernel;
components::MigrationAccommodator *mpMigrationAccommodator;
components::TraceManager *mpTraceManager;
/* Dependent Components */
components::MemoryHandler *mpMemoryHandler;
/// All model (i.e. parameters) files.
/// @example Velocity, density, epsilon and delta phi and theta
std::map<std::string, std::string> mModelFiles;
/// Traces files are different files each file contains
/// the traces for one shot that may be output from the
/// modeling engine
std::vector<std::string> mTraceFiles;
/**
* @brief shot_start_id and shot_end_id are to support the different formats,
*
* @example In .segy, you might have a file that has shots 0 to 200
* while you only want to work on shots between 100-150 so in this case:
* -- shot_start_id = 100
* -- shot_end_id = 150
* so those just specify the starting shot id (inclusive) and the ending shot
* id (exclusive)
*/
uint mSortMin;
uint mSortMax;
std::string mSortKey;
};
} //namespace configuration
} //namespace operations
#endif // OPERATIONS_LIB_ENGINE_CONFIGURATIONS_RTM_ENGINE_CONFIGURATION_HPP
| 9,843
|
C++
|
.h
| 205
| 35.970732
| 103
| 0.623567
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,386
|
ModellingEngineConfigurations.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/SeismicOperations/include/operations/engine-configurations/concrete/ModellingEngineConfigurations.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of SeismicToolbox.
*
* SeismicToolbox is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SeismicToolbox is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPERATIONS_LIB_MODELLING_ENGINE_CONFIGURATION_HPP
#define OPERATIONS_LIB_MODELLING_ENGINE_CONFIGURATION_HPP
#include <map>
#include <operations/engine-configurations/interface/EngineConfigurations.hpp>
#include <operations/components/independents/primitive/BoundaryManager.hpp>
#include <operations/components/independents/primitive/ComputationKernel.hpp>
#include <operations/components/independents/primitive/ModelHandler.hpp>
#include <operations/components/independents/primitive/TraceWriter.hpp>
#include <operations/components/independents/primitive/SourceInjector.hpp>
#include <operations/components/independents/primitive/TraceManager.hpp>
namespace operations {
namespace configurations {
/**
* @brief Class that contains pointers to concrete
* implementations of some of the components
* to be used in modelling engine
*
* @note ModellingEngineConfiguration is only used for modelling
* and it doesn't have a forward collector
* Because we don't need to store the forward propagation.
* If we are modeling then we only do forward and store the traces while
* propagating using the (TraceWriter) component we store the traces for each
* shot in the trace file.(each shot's traces in a different file)
*/
class ModellingEngineConfigurations : public EngineConfigurations {
public:
/**
* @brief Constructor
**/
ModellingEngineConfigurations() {
this->mpModelHandler = nullptr;
this->mpBoundaryManager = nullptr;
this->mpSourceInjector = nullptr;
this->mpComputationKernel = nullptr;
this->mpTraceManager = nullptr;
this->mpMemoryHandler = nullptr;
this->mpTraceWriter = nullptr;
this->mSortMin = -1;
this->mSortMax = -1;
}
/**
* @brief Destructor for correct destroying of the pointers
**/
~ModellingEngineConfigurations() override {
delete mpModelHandler;
delete mpBoundaryManager;
delete mpSourceInjector;
delete mpComputationKernel;
delete mpTraceWriter;
delete mpTraceManager;
delete mpMemoryHandler;
}
inline components::ModelHandler *GetModelHandler() const {
return this->mpModelHandler;
}
void SetModelHandler(components::ModelHandler *apModelHandler) {
this->mpModelHandler = apModelHandler;
this->mpComponentsMap->Set(MODEL_HANDLER, this->mpModelHandler);
}
inline components::BoundaryManager *GetBoundaryManager() const {
return this->mpBoundaryManager;
}
void SetBoundaryManager(components::BoundaryManager *apBoundaryManager) {
this->mpBoundaryManager = apBoundaryManager;
this->mpComponentsMap->Set(BOUNDARY_MANAGER, this->mpBoundaryManager);
}
inline components::SourceInjector *GetSourceInjector() const {
return this->mpSourceInjector;
}
void SetSourceInjector(components::SourceInjector *apSourceInjector) {
this->mpSourceInjector = apSourceInjector;
this->mpComponentsMap->Set(SOURCE_INJECTOR, this->mpSourceInjector);
}
inline components::ComputationKernel *GetComputationKernel() const {
return this->mpComputationKernel;
}
void SetComputationKernel(components::ComputationKernel *apComputationKernel) {
this->mpComputationKernel = apComputationKernel;
this->mpComponentsMap->Set(COMPUTATION_KERNEL, this->mpComputationKernel);
/// Set Memory Handler accordingly.
this->SetMemoryHandler(this->mpComputationKernel->GetMemoryHandler());
}
inline components::TraceManager *GetTraceManager() const {
return this->mpTraceManager;
}
void SetTraceManager(components::TraceManager *apTraceManager) {
this->mpTraceManager = apTraceManager;
this->mpComponentsMap->Set(TRACE_MANAGER, this->mpTraceManager);
}
inline components::TraceWriter *GetTraceWriter() const {
return this->mpTraceWriter;
}
inline void SetTraceWriter(components::TraceWriter *apTraceWriter) {
this->mpTraceWriter = apTraceWriter;
this->mpComponentsMap->Set(TRACE_WRITER, this->mpTraceWriter);
}
inline const std::map<std::string, std::string> &GetModelFiles() const {
return this->mModelFiles;
}
inline void SetModelFiles(const std::map<std::string, std::string> &aModelFiles) {
this->mModelFiles = aModelFiles;
}
inline const std::vector<std::string> &GetTraceFiles() const {
return this->mTraceFiles;
}
inline void SetTraceFiles(const std::vector<std::string> &aTraceFiles) {
this->mTraceFiles = aTraceFiles;
}
inline uint GetSortMin() const {
return this->mSortMin;
}
inline void SetSortMin(uint aSortMin) {
this->mSortMin = aSortMin;
}
inline uint GetSortMax() const {
return this->mSortMax;
}
inline void SetSortMax(uint aSortMax) {
this->mSortMax = aSortMax;
}
inline const std::string &GetSortKey() const {
return this->mSortKey;
}
inline void SetSortKey(const std::string &aSortKey) {
this->mSortKey = aSortKey;
}
private:
void SetMemoryHandler(components::MemoryHandler *apMemoryHandler) {
this->mpMemoryHandler = apMemoryHandler;
this->mpDependentComponentsMap->Set(MEMORY_HANDLER, this->mpMemoryHandler);
}
private:
/* Independent Components */
components::ModelHandler *mpModelHandler;
components::BoundaryManager *mpBoundaryManager;
components::SourceInjector *mpSourceInjector;
components::ComputationKernel *mpComputationKernel;
components::TraceWriter *mpTraceWriter;
components::TraceManager *mpTraceManager;
/* Dependent Components */
components::MemoryHandler *mpMemoryHandler;
/// All model (i.e. parameters) files.
/// @example Velocity, density, epsilon and delta phi and theta
std::map<std::string, std::string> mModelFiles;
/// Traces files are different files each file contains
/// the traces that the modeling engine would use as meta
/// data to generate shots.
std::vector<std::string> mTraceFiles;
/**
* @brief shot_start_id and shot_end_id are to support the different formats,
*
* @example In .segy, you might have a file that has shots 0 to 200
* while you only want to work on shots between 100-150 so in this case:
* -- shot_start_id = 100
* -- shot_end_id = 150
* so those just specify the starting shot id (inclusive) and the ending shot
* id (exclusive)
*/
uint mSortMin;
uint mSortMax;
std::string mSortKey;
};
} //namespace configuration
} //namespace operations
#endif //OPERATIONS_LIB_MODELLING_ENGINE_CONFIGURATION_HPP
| 8,724
|
C++
|
.h
| 183
| 35.677596
| 94
| 0.624559
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,387
|
EngineConfigurations.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/SeismicOperations/include/operations/engine-configurations/interface/EngineConfigurations.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of SeismicToolbox.
*
* SeismicToolbox is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SeismicToolbox is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPERATIONS_LIB_ENGINE_CONFIGURATIONS_ENGINE_CONFIGURATION_HPP
#define OPERATIONS_LIB_ENGINE_CONFIGURATIONS_ENGINE_CONFIGURATION_HPP
#include <operations/components/independents/interface/Component.hpp>
#include <operations/components/dependents/interface/DependentComponent.hpp>
#include <operations/components/dependency/helpers/ComponentsMap.tpp>
namespace operations {
namespace configurations {
/**
* @note
* Whether you need a destructor is NOT determined by whether you
* use a struct or class. The deciding factor is whether the struct/class has
* acquired resources that must be released explicitly when the life of the
* object ends. If the answer to the question is yes, then you need to implement
* a destructor. Otherwise, you don't need to implement it.
*/
/**
* @brief Class that will contain pointers to concrete
* implementations of each component to be used in the the
* desired framework engine.
*/
class EngineConfigurations {
public:
EngineConfigurations() {
this->mpComponentsMap = new helpers::ComponentsMap<components::Component>();
this->mpDependentComponentsMap = new helpers::ComponentsMap<components::DependentComponent>();
}
virtual ~EngineConfigurations() {
delete this->mpDependentComponentsMap;
delete this->mpComponentsMap;
}
inline virtual helpers::ComponentsMap<components::Component> *GetComponents() {
return this->mpComponentsMap;
}
inline virtual helpers::ComponentsMap<components::DependentComponent> *GetDependentComponents() {
return this->mpDependentComponentsMap;
}
protected:
helpers::ComponentsMap<components::Component> *mpComponentsMap;
helpers::ComponentsMap<components::DependentComponent> *mpDependentComponentsMap;
};
} //namespace configuration
} //namespace operations
#endif //OPERATIONS_LIB_ENGINE_CONFIGURATIONS_ENGINE_CONFIGURATION_HPP
| 2,876
|
C++
|
.h
| 61
| 40.672131
| 110
| 0.723351
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,388
|
Sampler.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/SeismicOperations/include/operations/utils/sampling/Sampler.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of SeismicToolbox.
*
* SeismicToolbox is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SeismicToolbox is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPERATIONS_LIB_UTILS_UTILS_SAMPLING_SAMPLER_HPP
#define OPERATIONS_LIB_UTILS_UTILS_SAMPLING_SAMPLER_HPP
#include <operations/common/ComputationParameters.hpp>
#include <operations/data-units/concrete/holders/GridBox.hpp>
#include <operations/data-units/concrete/holders/FrameBuffer.hpp>
using namespace operations::dataunits;
using namespace operations::common;
using namespace operations::dataunits::axis;
namespace operations {
namespace utils {
namespace sampling {
class Sampler {
public:
static void
Resize(float *input, float *output,
Axis3D<unsigned int> *apInputGridBox, Axis3D<unsigned int> *apOutputGridBox,
ComputationParameters *apParameters);
static void
CalculateAdaptiveCellDimensions(GridBox *apGridBox,
ComputationParameters *apParameters,
int aMinimum_velocity, float aMaxFrequency);
};
} //namespace sampling
} //namespace utils
} //namespace operations
#endif /* OPERATIONS_LIB_UTILS_UTILS_SAMPLING_SAMPLER_HPP */
| 1,976
|
C++
|
.h
| 44
| 37.25
| 99
| 0.695109
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,389
|
noise_filtering.h
|
brightskiesinc_Reverse_Time_Migration/libs/SeismicOperations/include/operations/utils/filters/noise_filtering.h
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of SeismicToolbox.
*
* SeismicToolbox is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SeismicToolbox is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPERATIONS_LIB_UTILS_NOISE_FILTERING_H
#define OPERATIONS_LIB_UTILS_NOISE_FILTERING_H
namespace operations {
namespace utils {
namespace filters {
typedef unsigned int uint;
void filter_stacked_correlation(float *input_frame, float *output_frame,
uint nx, uint ny, uint nz,
float dx, float dz, float dy);
void apply_laplace_filter(float *input_frame, float *output_frame,
unsigned int nx, unsigned int ny, unsigned int nz);
} //namespace filters
} //namespace utils
} //namespace operations
#endif //OPERATIONS_LIB_UTILS_NOISE_FILTERING_H
| 1,497
|
C++
|
.h
| 33
| 38.030303
| 89
| 0.679698
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,390
|
Checks.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/SeismicOperations/include/operations/utils/checks/Checks.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of SeismicToolbox.
*
* SeismicToolbox is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SeismicToolbox is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPERATIONS_LIB_UTILS_CHECKS_HPP
#define OPERATIONS_LIB_UTILS_CHECKS_HPP
#include <omp.h>
namespace operations {
namespace utils {
namespace checks {
/**
* @brief Checks if there is any device detected
* @return boolean[out]
*/
bool inline is_device_not_exist() {
return omp_get_num_devices() <= 0;
}
} //namespace checks
} //namespace utils
} //namespace operations
#endif //OPERATIONS_LIB_UTILS_CHECKS_HPP
| 1,291
|
C++
|
.h
| 35
| 32.028571
| 76
| 0.69593
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,391
|
Interpolator.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/SeismicOperations/include/operations/utils/interpolation/Interpolator.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of SeismicToolbox.
*
* SeismicToolbox is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SeismicToolbox is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPERATIONS_LIB_UTILS_INTERPOLATION_H
#define OPERATIONS_LIB_UTILS_INTERPOLATION_H
#include <operations/data-units/concrete/holders/TracesHolder.hpp>
namespace operations {
namespace utils {
namespace interpolation {
class Interpolator {
public:
/**
* @brief Takes a Trace struct and modifies it's attributes to fit with the new
* actual_nt
* @param apTraceHolder Traces struct
* @param actual_nt To be interpolated
* @param total_time Total time of forward propagation
* @param aInterpolation Interpolation type
* @return Interpolated apTraceHolder in Traces struct [Not needed]
*/
static float *
Interpolate(dataunits::TracesHolder *apTraceHolder, uint actual_nt, float total_time,
INTERPOLATION aInterpolation = NONE);
static float *
InterpolateLinear(dataunits::TracesHolder *apTraceHolder, uint actual_nt, float total_time);
static void
InterpolateTrilinear(float *old_grid, float *new_grid,
int old_nx, int old_nz, int old_ny,
int new_nx, int new_nz, int new_ny,
int bound_length,
int half_length);
};
} //namespace interpolation
} //namespace utils
} //namespace operations
#endif // OPERATIONS_LIB_UTILS_INTERPOLATION_H
| 2,435
|
C++
|
.h
| 51
| 36.764706
| 108
| 0.613636
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,392
|
Compressor.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/SeismicOperations/include/operations/utils/compressor/Compressor.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of SeismicToolbox.
*
* SeismicToolbox is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SeismicToolbox is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPERATIONS_LIB_UTILS_COMPRESSORS_COMPRESSOR_HPP
#define OPERATIONS_LIB_UTILS_COMPRESSORS_COMPRESSOR_HPP
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <string>
namespace operations {
namespace utils {
namespace compressors {
class Compressor {
public:
Compressor() = default;
~Compressor() = default;
/**
* @brief This is the main-entry point for all compression algorithms.
* Currently using a naive switch based differentiation of algorithm used
*/
static void Compress(float *array, int nx, int ny, int nz, int nt, double tolerance,
unsigned int codecType, const char *filename,
bool zfp_is_relative);
/**
* @brief This is the main-entry point for all decompression algorithms.
* Currently using a naive switch based differentiation of algorithm used
*/
static void Decompress(float *array, int nx, int ny, int nz, int nt, double tolerance,
unsigned int codecType, const char *filename,
bool zfp_is_relative);
};
} //namespace compressors
} //namespace utils
} //namespace operations
#endif //OPERATIONS_LIB_UTILS_COMPRESSORS_COMPRESSOR_HPP
| 2,262
|
C++
|
.h
| 51
| 34.843137
| 102
| 0.637477
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,393
|
read_utils.h
|
brightskiesinc_Reverse_Time_Migration/libs/SeismicOperations/include/operations/utils/io/read_utils.h
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of SeismicToolbox.
*
* SeismicToolbox is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SeismicToolbox is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPERATIONS_LIB_UTILS_READ_UTILS_H
#define OPERATIONS_LIB_UTILS_READ_UTILS_H
#include <operations/common/DataTypes.h>
#include <operations/common/ComputationParameters.hpp>
#include <operations/data-units/concrete/holders/GridBox.hpp>
#include <operations/data-units/concrete/holders/TracesHolder.hpp>
#include <bs/io/api/cpp/BSIO.hpp>
namespace operations {
namespace utils {
namespace io {
void ParseGatherToTraces(bs::io::dataunits::Gather *apGather, Point3D *apSource,
dataunits::TracesHolder *apTraces,
uint **x_position, uint **y_position,
dataunits::GridBox *apGridBox,
common::ComputationParameters *apParameters,
float *total_time);
bs::io::dataunits::Gather *CombineGather(std::vector<bs::io::dataunits::Gather *> &aGatherVector);
void RemoveDuplicatesFromGather(bs::io::dataunits::Gather *apGather);
bool IsLineGather(bs::io::dataunits::Gather *apGather);
} //namespace io
} //namespace utils
} //namespace operations
#endif //OPERATIONS_LIB_UTILS_READ_UTILS_H
| 2,001
|
C++
|
.h
| 41
| 40.95122
| 110
| 0.684076
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,394
|
write_utils.h
|
brightskiesinc_Reverse_Time_Migration/libs/SeismicOperations/include/operations/utils/io/write_utils.h
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of SeismicToolbox.
*
* SeismicToolbox is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SeismicToolbox is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPERATIONS_LIB_UTILS_WRITE_UTILS_H
#define OPERATIONS_LIB_UTILS_WRITE_UTILS_H
#include <operations/common/DataTypes.h>
#include <string>
#include <bs/io/api/cpp/BSIO.hpp>
namespace operations {
namespace utils {
namespace io {
/**
* @brief
* Transform an array of data into a gather of traces for IO.
*
* @param[in] apData
* The actual data array.
*
* @param[in] aNX
* The number of traces in x-direction.
*
* @param[in] aNY
* The number of traces in y-direction.
*
* @param[in] aNS
* The number of samples.
*
* @param[in] aDX
* Sampling in x-direction.
*
* @param[in] aDY
* Sampling in y-direction.
*
* @param[in] aDS
* Sampling of samples.
*
* @param[in] aSX
* The starting x actual location.
*
* @param[in] aSY
* The starting y actual location.
*
* @param[in] aOffsetX
* The offset in x direction
*
* @param[in] aOffsetY
* The offset in y direction.
*
* @param[in] aShots
* The number of aShots.
*
* @param[in] aSpaceScale
* The space sampling scaling for x and y.
*
* @param[in] aSampleScale
* The sample sampling rate scaling.
*
* @return
* A gather with the produced traces.
*/
std::vector<bs::io::dataunits::Gather *> TransformToGather(const float *apData,
uint aNX, uint aNY, uint aNS,
float aDX, float aDY, float aDS,
float aSX, float aSY,
int aOffsetX, int aOffsetY,
uint aShots,
float aSpaceScale,
float aSampleScale);
/**
* @brief
* Transform an array of data into a gather of traces for IO.
*
* @param[in] apData
* The actual data array.
*
* @param[in] aNX
* The number of traces in x-direction.
*
* @param[in] aNY
* The number of traces in y-direction.
*
* @param[in] aNS
* The number of samples.
*
* @param[in] aDX
* Sampling in x-direction.
*
* @param[in] aDY
* Sampling in y-direction.
*
* @param[in] aDS
* Sampling of samples.
*
* @param[in] apMetaDataGather
* A gather containing the meta-data of each trace,
* to be combined with the given data.
*
* @param[in] aShots
* The number of aShots.
*
* @param[in] aSampleScale
* The sample sampling rate scaling.
*
* @return
* A gather with the produced traces.
*/
std::vector<bs::io::dataunits::Gather *>
TransformToGather(const float *apData,
uint aNX, uint aNY, uint aNS,
float aDS,
bs::io::dataunits::Gather *apMetaDataGather,
uint aShots,
float aSampleScale);
} //namespace io
} //namespace utils
} //namespace operations
#endif // OPERATIONS_LIB_UTILS_WRITE_UTILS_H
| 4,942
|
C++
|
.h
| 132
| 22.363636
| 103
| 0.462227
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,395
|
RTMEngine.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/SeismicOperations/include/operations/engines/concrete/RTMEngine.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of SeismicToolbox.
*
* SeismicToolbox is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SeismicToolbox is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPERATIONS_LIB_ENGINES_RTM_ENGINE_HPP
#define OPERATIONS_LIB_ENGINES_RTM_ENGINE_HPP
#include <operations/engines/interface/Engine.hpp>
#include <operations/engine-configurations/concrete/RTMEngineConfigurations.hpp>
namespace operations {
namespace engines {
/**
* @brief The RTM engine responsible of using the different
* components to apply the reverse time migration (RTM).
*/
class RTMEngine : public Engine {
public:
/**
* @brief Constructor for the RTM engine giving it the configuration needed.
*
* @param[in] apConfiguration
* The engine configuration that should be used for the RTM engine.
*
* @param[in] apParameters
* The computation parameters that will control the simulations settings like
* boundary length, order of numerical solution.
*/
RTMEngine(configurations::RTMEngineConfigurations *apConfiguration,
common::ComputationParameters *apParameters);
/**
* @brief Constructor for the RTM engine giving it the configuration needed.
*
* @param[in] apConfiguration
* The engine configuration that should be used for the RTM engine.
*
* @param[in] apParameters
* The computation parameters that will control the simulations settings like
* boundary length, order of numerical solution.
*
* @param[in] apCallbackCollection
* The callback collection to be called throughout the execution if in debug
* mode.
*/
RTMEngine(configurations::RTMEngineConfigurations *apConfiguration,
common::ComputationParameters *apParameters,
helpers::callbacks::CallbackCollection *apCallbackCollection);
/**
* @brief Destructors should be overridden to ensure correct memory management.
*/
~RTMEngine() override;
/**
* @brief Initializes domain model.
*/
dataunits::GridBox *
Initialize() override;
/**
* @brief The function that filters and returns all possible
* shot ID in a vector to be fed to the migrate method.
*
* @return[out]
* A vector containing all unique shot IDs.
*/
std::vector<uint>
GetValidShots() override;
/**
* @brief The migration function that will apply the
* reverse time migration process and produce the results needed.
*
* @param[in] shot_list
* A vector containing the shot IDs to be migrated.
*/
void
MigrateShots(std::vector<uint> shot_numbers, dataunits::GridBox *apGridBox) override;
/**
* @brief The migration function that will apply the
* reverse time migration process and produce the results needed.
*
* @param[in] shot_id
* Shot IDs to be migrated.
*/
void
MigrateShots(uint shot_id, dataunits::GridBox *apGridBox);
/**
* @brief Finalizes and terminates all processes
*
* @return[out]
* A float pointer to the array containing the final correlation result.
*/
dataunits::MigrationData *
Finalize(dataunits::GridBox *apGridBox) override;
private:
/**
* @brief Applies the forward propagation using the different
* components provided in the configuration.
*/
void
Forward(dataunits::GridBox *apGridBox);
/**
* @brief Applies the backward propagation using the different
* components provided in the configuration.
*/
void
Backward(dataunits::GridBox *apGridBox);
private:
/// The configuration containing the actual components to be used in the process.
configurations::RTMEngineConfigurations *mpConfiguration;
};
} //namespace engines
} //namespace operations
#endif // OPERATIONS_LIB_ENGINES_RTM_ENGINE_HPP
| 5,236
|
C++
|
.h
| 123
| 31.463415
| 97
| 0.607374
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,396
|
ModellingEngine.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/SeismicOperations/include/operations/engines/concrete/ModellingEngine.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of SeismicToolbox.
*
* SeismicToolbox is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SeismicToolbox is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPERATIONS_LIB_ENGINES_MODELLING_ENGINE_HPP
#define OPERATIONS_LIB_ENGINES_MODELLING_ENGINE_HPP
#include <operations/helpers/callbacks/primitive/CallbackCollection.hpp>
#include <operations/engines/interface/Engine.hpp>
#include <operations/engine-configurations/concrete/ModellingEngineConfigurations.hpp>
namespace operations {
namespace engines {
/**
* @brief The Modelling engine responsible of using the different
* components to model the needed algorithm.
*/
class ModellingEngine : public Engine {
public:
/**
* @brief Constructor to start the modelling engine given the appropriate engine
* configuration.
*
* @param[in] apConfiguration
* The configuration which will control the actual work of the engine.
*
* @param[in] apParameters
* The computation parameters that will control the simulations settings like
* boundary length, order of numerical solution.
*/
ModellingEngine(configurations::ModellingEngineConfigurations *apConfiguration,
common::ComputationParameters *apParameters);
/**
* @brief Constructor to start the modelling engine given the appropriate engine
* configuration.
*
* @param[in] apConfiguration
* The configuration which will control the actual work of the engine.
*
* @param[in] apParameters
* The computation parameters that will control the simulations settings like
* boundary length, order of numerical solution.
*
* @param[in] apCallbackCollection
* The callbacks registered to be called in the right time.
*/
ModellingEngine(configurations::ModellingEngineConfigurations *apConfiguration,
common::ComputationParameters *apParameters,
helpers::callbacks::CallbackCollection *apCallbackCollection);
/**
* @brief Destructors should be overridden to ensure correct memory management.
*/
~ModellingEngine() override;
/**
* @brief Run the initialization steps for the modelling engine.
*
* @return[out] GridBox
*/
dataunits::GridBox *
Initialize() override;
/**
* @brief The function that filters and returns all possible
* shot ID in a vector to be fed to the migrate method.
*
* @return[out]
* A vector containing all unique shot IDs.
*/
std::vector<uint>
GetValidShots() override;
/**
* @brief The migration function that will apply the
* reverse time migration process and produce the results needed.
*
* @param[in] shot_list
* A vector containing the shot IDs to be migrated.
*/
void
MigrateShots(std::vector<uint> shot_numbers, dataunits::GridBox *apGridBox) override;
/**
* @brief The migration function that will apply the
* modeling process and produce the results needed.
*
* @param[in] shot_id
* Shot IDs to be modeled.
*/
void
MigrateShots(uint shot_id, dataunits::GridBox *apGridBox);
/**
* @brief Finalizes and terminates all processes
*
* @return[out]
* A float pointer to the array containing the final correlation result.
*/
dataunits::MigrationData *
Finalize(dataunits::GridBox *apGridBox) override;
private:
/**
* @brief Applies the forward propagation using the different
* components provided in the configuration.
*/
void
Forward(dataunits::GridBox *apGridBox, uint shot_id);
private:
///The configuration containing the actual components to be used in the process.
configurations::ModellingEngineConfigurations *mpConfiguration;
};
} //namespace engines
} //namespace operations
#endif // OPERATIONS_LIB_ENGINES_MODELLING_ENGINE_HPP
| 5,268
|
C++
|
.h
| 121
| 32.404959
| 97
| 0.615549
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,397
|
Engine.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/SeismicOperations/include/operations/engines/interface/Engine.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of SeismicToolbox.
*
* SeismicToolbox is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SeismicToolbox is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPERATIONS_LIB_ENGINES_ENGINE_HPP
#define OPERATIONS_LIB_ENGINES_ENGINE_HPP
#include <vector>
#include <operations/helpers/callbacks/primitive/CallbackCollection.hpp>
#include <operations/data-units/concrete/migration/MigrationData.hpp>
namespace operations {
namespace engines {
/**
* @note Each engine comes with it's own Timer and Logger. Logger
* Channel should be initialized at each concrete implementation
* and should be destructed at each destructor.
*/
class Engine {
public:
/**
* @brief Destructors should be overridden to ensure correct memory management.
*/
virtual ~Engine() {};
/**
* @brief Initializes domain model.
*/
virtual dataunits::GridBox *Initialize() = 0;
/**
* @brief The function that filters and returns all possible
* shot ID in a vector to be fed to the migrate method.
*
* @return[out]
* A vector containing all unique shot IDs.
*/
virtual std::vector<uint> GetValidShots() = 0;
/// @todo GetValidGathers
/**
* @brief The migration function that will apply the
* reverse time migration process and produce the results needed.
*
* @param[in] shot_list
* A vector containing the shot IDs to be migrated.
*/
virtual void MigrateShots(std::vector<uint> shot_numbers, dataunits::GridBox *apGridBox) = 0;
/// @todo ProcessGathers
/**
* @brief Finalizes and terminates all processes
*t();
Logger->In
* @return[out]
* A float pointer to the array containing the final correlation result.
*/
virtual dataunits::MigrationData *Finalize(dataunits::GridBox *apGridBox) = 0;
protected:
/// Callback collection to be called when not in release mode.
helpers::callbacks::CallbackCollection *mpCallbacks;
/// Computations parameters.
common::ComputationParameters *mpParameters;
};
} //namespace engines
} //namespace operations
#endif //OPERATIONS_LIB_ENGINES_ENGINE_HPP
| 3,121
|
C++
|
.h
| 75
| 32.826667
| 105
| 0.636693
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,398
|
DataTypes.h
|
brightskiesinc_Reverse_Time_Migration/libs/SeismicOperations/include/operations/common/DataTypes.h
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of SeismicToolbox.
*
* SeismicToolbox is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SeismicToolbox is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPERATIONS_LIB_BASE_DATA_TYPES_H
#define OPERATIONS_LIB_BASE_DATA_TYPES_H
/**
* @brief Axis definitions
*/
#define Y_AXIS 0
#define Z_AXIS 1
#define X_AXIS 2
#define OP_DIREC_FRONT 0 /* used to add boundary or padding at the axis front */
#define OP_DIREC_REAR 1 /* used to add boundary or padding at the axis rear */
#define OP_DIREC_BOTH 2 /* used to add boundary or padding at the axis front and rear */
/// Unsigned integer type to be used for strictly positive numbers.
typedef unsigned int uint;
/**
* @brief Enums for the supported order lengths.
*
* @note Here we put values for each enum variable
* if we make instance of HALF_LENGTH and assign it to O_2 for example
* it will return 1;
*/
enum HALF_LENGTH {
O_2 = 1, O_4 = 2, O_8 = 4, O_12 = 6, O_16 = 8
};
enum PHYSICS {
ACOUSTIC, ELASTIC
};
enum APPROXIMATION {
ISOTROPIC
};
enum EQUATION_ORDER {
SECOND, FIRST
};
enum GRID_SAMPLING {
UNIFORM, VARIABLE
};
enum INTERPOLATION {
NONE, SPLINE, TRILINEAR
};
enum ALGORITHM {
RTM, FWI, PSDM, PSTM
};
/**
* @brief Struct describing the number of points in our grid.
*/
struct GridSize {
public:
GridSize() = default;
GridSize(uint _nx, uint _ny, uint _nz)
: nx(_nx), ny(_ny), nz(_nz) {}
public:
uint nx;
uint nz;
uint ny;
};
/**
* @brief The step size in each direction.
*/
struct CellDimensions {
public:
CellDimensions() = default;
CellDimensions(float _dx, float _dy, float _dz)
: dx(_dx), dy(_dy), dz(_dz) {}
public:
float dx;
float dz;
float dy;
};
/**
* @brief Point co-ordinates in 3D.
*/
struct Point3D {
public:
Point3D() = default;
Point3D(uint _x, uint _y, uint _z)
: x(_x), y(_y), z(_z) {}
// Copy constructor
Point3D(const Point3D &P) {
x = P.x;
y = P.y;
z = P.z;
}
void operator=(const Point3D &P) {
x = P.x;
y = P.y;
z = P.z;
}
bool operator==(const Point3D &P) {
bool value = false;
value = ((x == P.x) && (y == P.y) && (z == P.z));
return value;
}
public:
uint x;
uint z;
uint y;
};
/**
* @brief Floating Point co-ordinates in 3D.
*/
struct FPoint3D {
public:
FPoint3D() = default;
FPoint3D(float _x, float _y, float _z)
: x(_x), y(_y), z(_z) {}
// Copy constructor
FPoint3D(const FPoint3D &P) {
x = P.x;
y = P.y;
z = P.z;
}
FPoint3D &operator=(const FPoint3D &P) = default;
bool operator==(const FPoint3D &P) const {
bool value = false;
value = ((x == P.x) && (y == P.y) && (z == P.z));
return value;
}
public:
float x;
float z;
float y;
};
/**
* @brief Integer point in 3D.
*/
struct IPoint3D {
public:
IPoint3D() = default;
IPoint3D(int _x, int _y, int _z)
: x(_x), y(_y), z(_z) {}
public:
int x;
int z;
int y;
};
/**
* @brief An object representing our full window size,
* will not match grid size if a window model is applied.
*/
struct WindowProperties {
public:
WindowProperties() = default;
WindowProperties(uint _wnx, uint _wnz, uint _wny, Point3D _window_start)
: wnx(_wnx), wny(_wny), wnz(_wnz), window_start(_window_start) {}
public:
/**
* @brief Will be set by traces to the appropriate
* start of the velocity (including boundary).
*
* As the trace manager knows the shot location so it will change
* the start of the window according to the shot location in each shot
*/
Point3D window_start;
/// Will be set by ModelHandler to match all parameters properties.
uint wnx;
uint wnz;
uint wny;
};
#endif // OPERATIONS_LIB_BASE_DATA_TYPES_H
| 4,554
|
C++
|
.h
| 176
| 21.994318
| 96
| 0.633433
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,399
|
ComputationParameters.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/SeismicOperations/include/operations/common/ComputationParameters.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of SeismicToolbox.
*
* SeismicToolbox is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SeismicToolbox is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPERATIONS_LIB_COMPUTATION_PARAMETERS_HPP
#define OPERATIONS_LIB_COMPUTATION_PARAMETERS_HPP
#include "DataTypes.h"
namespace operations {
namespace common {
/**
* @brief Parameters of the simulation independent from the block.
*/
class ComputationParameters {
public:
/**
* @brief Constructor of the class, it takes as input the half_length
*/
explicit ComputationParameters(HALF_LENGTH aHalfLength) {
/// Assign default values.
this->mBlockX = 512;
this->mBlockY = 15;
this->mBlockZ = 44;
this->mThreadCount = 16;
this->mSourceFrequency = 200;
this->mIsotropicRadius = 5;
this->mBoundaryLength = 20;
this->mHalfLength = aHalfLength;
this->mRelaxedDT = 0.4;
this->mIsUsingWindow = false;
/// Array of floats of size hl+1 only contains the zero and positive (x>0 )
/// coefficients and not all coefficients
this->mpSecondDerivativeFDCoefficient = new float[aHalfLength + 1];
/// Array of floats of size hl+1 only contains the zero and positive (x>0 )
/// coefficients and not all coefficients
this->mpFirstDerivativeFDCoefficient = new float[aHalfLength + 1];
/// Array of floats of size hl+1 only contains the zero and positive (x>0 )
/// coefficients and not all coefficients
this->mpFirstDerivativeStaggeredFDCoefficient = new float[aHalfLength + 1];
if (aHalfLength == O_2) {
/**
* Accuracy = 2
* Half Length = 1
*/
this->mpSecondDerivativeFDCoefficient[0] = -2;
this->mpSecondDerivativeFDCoefficient[1] = 1;
this->mpFirstDerivativeFDCoefficient[0] = 0;
this->mpFirstDerivativeFDCoefficient[1] = 0.5;
this->mpFirstDerivativeStaggeredFDCoefficient[0] = 0.0f;
this->mpFirstDerivativeStaggeredFDCoefficient[1] = 1.0f;
} else if (aHalfLength == O_4) {
/**
* Accuracy = 4
* Half Length = 2
*/
this->mpSecondDerivativeFDCoefficient[0] = -2.5;
this->mpSecondDerivativeFDCoefficient[1] = 1.33333333333;
this->mpSecondDerivativeFDCoefficient[2] = -0.08333333333;
this->mpFirstDerivativeFDCoefficient[0] = 0.0f;
this->mpFirstDerivativeFDCoefficient[1] = 2.0f / 3.0f;
this->mpFirstDerivativeFDCoefficient[2] = -1.0f / 12.0f;
this->mpFirstDerivativeStaggeredFDCoefficient[0] = 0.0f;
this->mpFirstDerivativeStaggeredFDCoefficient[1] = 1.125f;
this->mpFirstDerivativeStaggeredFDCoefficient[2] = -0.041666666666666664f;
} else if (aHalfLength == O_8) {
/**
* Accuracy = 8
* Half Length = 4
*/
this->mpSecondDerivativeFDCoefficient[0] = -2.847222222;
this->mpSecondDerivativeFDCoefficient[1] = +1.6;
this->mpSecondDerivativeFDCoefficient[2] = -0.2;
this->mpSecondDerivativeFDCoefficient[3] = +2.53968e-2;
this->mpSecondDerivativeFDCoefficient[4] = -1.785714e-3;
this->mpFirstDerivativeFDCoefficient[0] = 0;
this->mpFirstDerivativeFDCoefficient[1] = +0.8;
this->mpFirstDerivativeFDCoefficient[2] = -0.2;
this->mpFirstDerivativeFDCoefficient[3] = +0.03809523809;
this->mpFirstDerivativeFDCoefficient[4] = -0.00357142857;
this->mpFirstDerivativeStaggeredFDCoefficient[0] = 0.0f;
this->mpFirstDerivativeStaggeredFDCoefficient[1] = 1.1962890625f;
this->mpFirstDerivativeStaggeredFDCoefficient[2] = -0.07975260416666667f;
this->mpFirstDerivativeStaggeredFDCoefficient[3] = 0.0095703125f;
this->mpFirstDerivativeStaggeredFDCoefficient[4] = -0.0006975446428571429f;
} else if (aHalfLength == O_12) {
/**
* Accuracy = 12
* Half Length = 6
*/
this->mpSecondDerivativeFDCoefficient[0] = -2.98277777778;
this->mpSecondDerivativeFDCoefficient[1] = 1.71428571429;
this->mpSecondDerivativeFDCoefficient[2] = -0.26785714285;
this->mpSecondDerivativeFDCoefficient[3] = 0.05291005291;
this->mpSecondDerivativeFDCoefficient[4] = -0.00892857142;
this->mpSecondDerivativeFDCoefficient[5] = 0.00103896103;
this->mpSecondDerivativeFDCoefficient[6] = -0.00006012506;
this->mpFirstDerivativeFDCoefficient[0] = 0.0;
this->mpFirstDerivativeFDCoefficient[1] = 0.857142857143;
this->mpFirstDerivativeFDCoefficient[2] = -0.267857142857;
this->mpFirstDerivativeFDCoefficient[3] = 0.0793650793651;
this->mpFirstDerivativeFDCoefficient[4] = -0.0178571428571;
this->mpFirstDerivativeFDCoefficient[5] = 0.0025974025974;
this->mpFirstDerivativeFDCoefficient[6] = -0.000180375180375;
this->mpFirstDerivativeStaggeredFDCoefficient[0] = 0.0f;
this->mpFirstDerivativeStaggeredFDCoefficient[1] = 1.2213363647460938f;
this->mpFirstDerivativeStaggeredFDCoefficient[2] = -0.09693145751953125f;
this->mpFirstDerivativeStaggeredFDCoefficient[3] = 0.017447662353515626f;
this->mpFirstDerivativeStaggeredFDCoefficient[4] = -0.002967289515904018f;
this->mpFirstDerivativeStaggeredFDCoefficient[5] = 0.0003590053982204861f;
this->mpFirstDerivativeStaggeredFDCoefficient[6] = -2.184781161221591e-05f;
} else if (aHalfLength == O_16) {
/**
* Accuracy = 16
* Half Length = 8
*/
this->mpSecondDerivativeFDCoefficient[0] = -3.05484410431;
this->mpSecondDerivativeFDCoefficient[1] = 1.77777777778;
this->mpSecondDerivativeFDCoefficient[2] = -0.311111111111;
this->mpSecondDerivativeFDCoefficient[3] = 0.0754208754209;
this->mpSecondDerivativeFDCoefficient[4] = -0.0176767676768;
this->mpSecondDerivativeFDCoefficient[5] = 0.00348096348096;
this->mpSecondDerivativeFDCoefficient[6] = -0.000518000518001;
this->mpSecondDerivativeFDCoefficient[7] = 5.07429078858e-05;
this->mpSecondDerivativeFDCoefficient[8] = -2.42812742813e-06;
this->mpFirstDerivativeFDCoefficient[0] = -6.93889390391e-17;
this->mpFirstDerivativeFDCoefficient[1] = 0.888888888889;
this->mpFirstDerivativeFDCoefficient[2] = -0.311111111111;
this->mpFirstDerivativeFDCoefficient[3] = 0.113131313131;
this->mpFirstDerivativeFDCoefficient[4] = -0.0353535353535;
this->mpFirstDerivativeFDCoefficient[5] = 0.00870240870241;
this->mpFirstDerivativeFDCoefficient[6] = -0.001554001554;
this->mpFirstDerivativeFDCoefficient[7] = 0.0001776001776;
this->mpFirstDerivativeFDCoefficient[8] = -9.71250971251e-06;
this->mpFirstDerivativeStaggeredFDCoefficient[0] = 0.0f;
this->mpFirstDerivativeStaggeredFDCoefficient[1] = 1.2340910732746122f;
this->mpFirstDerivativeStaggeredFDCoefficient[2] = -0.10664984583854668f;
this->mpFirstDerivativeStaggeredFDCoefficient[3] = 0.023036366701126076f;
this->mpFirstDerivativeStaggeredFDCoefficient[4] = -0.005342385598591385f;
this->mpFirstDerivativeStaggeredFDCoefficient[5] = 0.0010772711700863268f;
this->mpFirstDerivativeStaggeredFDCoefficient[6] = -0.00016641887751492495f;
this->mpFirstDerivativeStaggeredFDCoefficient[7] = 1.7021711056048922e-05f;
this->mpFirstDerivativeStaggeredFDCoefficient[8] = -8.523464202880773e-07f;
}
}
/**
* @brief Destructor is virtual which can be overridden in
* derived classes from this class.
*/
virtual ~ComputationParameters() {
/// Destruct the array of floats of coefficients of the
/// second derivative finite difference
delete[] this->mpSecondDerivativeFDCoefficient;
/// Destruct the array of floats of coefficients of the
/// first derivative finite difference
delete[] this->mpFirstDerivativeFDCoefficient;
/// Destruct the array of floats of coefficients of the
/// first derivative staggered finite difference
delete[] this->mpFirstDerivativeStaggeredFDCoefficient;
}
/**
* Setter and getters.
*/
public:
inline const EQUATION_ORDER &GetEquationOrder() const {
return this->mEquationOrder;
}
inline void SetEquationOrder(const EQUATION_ORDER &aEquationOrder) {
this->mEquationOrder = aEquationOrder;
}
inline const PHYSICS &GetPhysics() const {
return this->mPhysics;
}
inline void SetPhysics(const PHYSICS &aPhysics) {
this->mPhysics = aPhysics;
}
inline const APPROXIMATION &GetApproximation() const {
return mApproximation;
}
inline void SetApproximation(const APPROXIMATION &aApproximation) {
this->mApproximation = aApproximation;
}
inline float GetSourceFrequency() const {
return this->mSourceFrequency;
}
inline void SetSourceFrequency(float aSourceFrequency) {
this->mSourceFrequency = aSourceFrequency;
}
inline float GetMaxPropagationFrequency() const {
return this->mMaxPropagationFrequency;
}
inline void SetMaxPropagationFrequency(float aMaxPropagationFrequency) {
this->mMaxPropagationFrequency = aMaxPropagationFrequency;
}
inline int GetIsotropicRadius() const {
return this->mIsotropicRadius;
}
inline void SetIsotropicRadius(int aIsotropicRadius) {
this->mIsotropicRadius = aIsotropicRadius;
}
inline const HALF_LENGTH &GetHalfLength() const {
return this->mHalfLength;
}
inline void SetHalfLength(const HALF_LENGTH &aHalfLength) {
this->mHalfLength = aHalfLength;
}
inline int GetBoundaryLength() const {
return this->mBoundaryLength;
}
inline void SetBoundaryLength(int aBoundaryLength) {
this->mBoundaryLength = aBoundaryLength;
}
inline float *GetSecondDerivativeFDCoefficient() const {
return this->mpSecondDerivativeFDCoefficient;
}
inline float *GetFirstDerivativeFDCoefficient() const {
return this->mpFirstDerivativeFDCoefficient;
}
inline float *GetFirstDerivativeStaggeredFDCoefficient() const {
return this->mpFirstDerivativeStaggeredFDCoefficient;
}
inline float GetRelaxedDT() const {
return this->mRelaxedDT;
}
inline void SetRelaxedDT(float aRelaxedDt) {
this->mRelaxedDT = aRelaxedDt;
}
inline bool IsUsingWindow() const {
return this->mIsUsingWindow;
}
inline void SetIsUsingWindow(bool aIsUsingWindow) {
this->mIsUsingWindow = aIsUsingWindow;
}
inline int GetLeftWindow() const {
return this->mLeftWindow;
}
inline void SetLeftWindow(int aLeftWindow) {
this->mLeftWindow = aLeftWindow;
}
inline int GetRightWindow() const {
return this->mRightWindow;
}
inline void SetRightWindow(int aRightWindow) {
this->mRightWindow = aRightWindow;
}
inline int GetDepthWindow() const {
return mDepthWindow;
}
inline void SetDepthWindow(int aDepthWindow) {
this->mDepthWindow = aDepthWindow;
}
inline int GetFrontWindow() const {
return mFrontWindow;
}
inline void SetFrontWindow(int aFrontWindow) {
this->mFrontWindow = aFrontWindow;
}
inline int GetBackWindow() const {
return this->mBackWindow;
}
inline void SetBackWindow(int aBackWindow) {
this->mBackWindow = aBackWindow;
};
inline int GetAlgorithm() const {
return this->mAlgorithm;
}
inline void SetAlgorithm(ALGORITHM aAlgorithm) {
this->mAlgorithm = aAlgorithm;
};
uint GetBlockX() const {
return this->mBlockX;
}
void SetBlockX(uint block_x) {
this->mBlockX = block_x;
}
uint GetBlockY() const {
return this->mBlockY;
}
void SetBlockY(uint block_y) {
this->mBlockY = block_y;
}
uint GetBlockZ() const {
return this->mBlockZ;
}
void SetBlockZ(uint block_z) {
this->mBlockZ = block_z;
}
uint GetThreadCount() const {
return this->mThreadCount;
}
void SetThreadCount(uint thread_count) {
this->mThreadCount = thread_count;
}
private:
/// Wave equation order.
EQUATION_ORDER mEquationOrder;
/// Wave equation physics.
PHYSICS mPhysics;
/// Wave equation approximation.
APPROXIMATION mApproximation;
/// Frequency of the source (ricker wavelet).
float mSourceFrequency;
/// Maximum frequency supported for the propagation.
float mMaxPropagationFrequency;
/// Injected isotropic radius accompanied with the ricker
/// for shear wave suppression
int mIsotropicRadius;
/// Boundary length (i.e. Regardless the type of boundary).
int mBoundaryLength;
HALF_LENGTH mHalfLength;
/// Pointer of floats (array of floats) which contains the
/// second derivative finite difference coefficient.
float *mpSecondDerivativeFDCoefficient;
/// Pointer of floats (array of floats) which contains the
/// first derivative finite difference coefficient.
float *mpFirstDerivativeFDCoefficient;
/// Pointer of floats (array of floats) which contains the
/// first derivative staggered finite difference coefficient.
float *mpFirstDerivativeStaggeredFDCoefficient;
/// Stability condition safety / Relaxation factor.
float mRelaxedDT;
/// Use window for propagation.
bool mIsUsingWindow;
/// Left-side window size.
int mLeftWindow = 0;
/// Right-side window size.
int mRightWindow = 0;
/// Depth window size.
int mDepthWindow = 0;
/// Front window size.
int mFrontWindow = 0;
/// Backward window size.
int mBackWindow = 0;
/// Algorithm
/// (i.e. -> RTM | PSDM | PSTM | FWI)
ALGORITHM mAlgorithm;
/// Cache blocking in X
uint mBlockX;
/// Cache blocking in Y
uint mBlockY;
/// Cache blocking in Z
uint mBlockZ;
/// Number of threads
uint mThreadCount;
};
}//namespace common
}//namespace operations
#endif //OPERATIONS_LIB_COMPUTATION_PARAMETERS_HPP
| 18,042
|
C++
|
.h
| 360
| 34.636111
| 96
| 0.57527
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,400
|
MapKeys.h
|
brightskiesinc_Reverse_Time_Migration/libs/SeismicOperations/include/operations/configurations/MapKeys.h
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of SeismicToolbox.
*
* SeismicToolbox is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SeismicToolbox is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPERATIONS_LIB_CONFIGURATIONS_MAP_KEYS_HPP
#define OPERATIONS_LIB_CONFIGURATIONS_MAP_KEYS_HPP
namespace operations {
namespace configurations {
#define OP_K_PROPRIETIES "properties"
#define OP_K_USE_TOP_LAYER "use-top-layer"
#define OP_K_SHOT_STRIDE "shot-stride"
#define OP_K_REFLECT_COEFFICIENT "reflect-coeff"
#define OP_K_SHIFT_RATIO "shift-ratio"
#define OP_K_RELAX_COEFFICIENT "relax-coeff"
#define OP_K_ZFP_TOLERANCE "zfp-tolerance"
#define OP_K_ZFP_PARALLEL "zfp-parallel"
#define OP_K_ZFP_RELATIVE "zfp-relative"
#define OP_K_WRITE_PATH "write-path"
#define OP_K_COMPRESSION "compression"
#define OP_K_COMPRESSION_TYPE "compression-type"
#define OP_K_BOUNDARY_SAVING "boundary-saving"
#define OP_K_COMPENSATION "compensation"
#define OP_K_COMPENSATION_NONE "none"
#define OP_K_COMPENSATION_COMBINED "combined"
#define OP_K_COMPENSATION_RECEIVER "receiver"
#define OP_K_COMPENSATION_SOURCE "source"
#define OP_K_COMPENSATION "compensation"
#define OP_K_TYPE "type"
#define OP_K_HEADER_ONLY "header-only"
#define OP_K_INTERPOLATION "interpolation"
#define OP_K_NONE "none"
#define OP_K_SPLINE "spline"
#define OP_K_OUTPUT_FILE "output-file"
#define OP_K_MAX_FREQ_AMP_PERCENT "max-freq-amplitude-percentage"
#define OP_K_DIP_ANGLE "dip-angle"
#define OP_K_DEPTH_SAMPLING_SCALING "depth-sampling-scaling"
#define OP_K_GRAIN_SIDE_LENGTH "grain-side-length"
} //namespace configuration
} //namespace operations
#endif //OPERATIONS_LIB_CONFIGURATIONS_MAP_KEYS_HPP
| 2,580
|
C++
|
.h
| 54
| 46.222222
| 76
| 0.679492
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,401
|
NormWriter.h
|
brightskiesinc_Reverse_Time_Migration/libs/SeismicOperations/include/operations/helpers/callbacks/concrete/NormWriter.h
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of SeismicToolbox.
*
* SeismicToolbox is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SeismicToolbox is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPERATIONS_LIB_HELPERS_CALLBACKS_NORM_WRITER_H
#define OPERATIONS_LIB_HELPERS_CALLBACKS_NORM_WRITER_H
#include <fstream>
#include <string>
#include <operations/helpers/callbacks/interface/Callback.hpp>
namespace operations {
namespace helpers {
namespace callbacks {
class NormWriter : public Callback {
public:
NormWriter(uint aShowEach,
bool aWriteForward,
bool aWriteBackward,
bool aWriteReverse,
const std::string &aWritePath);
~NormWriter();
void
BeforeInitialization(common::ComputationParameters *apParameters) override;
void
AfterInitialization(dataunits::GridBox *apGridBox) override;
void
BeforeShotPreprocessing(dataunits::TracesHolder *apTraces) override;
void
AfterShotPreprocessing(dataunits::TracesHolder *apTraces) override;
void
BeforeForwardPropagation(dataunits::GridBox *apGridBox) override;
void
AfterForwardStep(dataunits::GridBox *apGridBox, int aTimeStep) override;
void
BeforeBackwardPropagation(dataunits::GridBox *apGridBox) override;
void
AfterBackwardStep(dataunits::GridBox *apGridBox, int aTimeStep) override;
void
AfterFetchStep(dataunits::GridBox *apGridBox, int aTimeStep) override;
void
BeforeShotStacking(dataunits::GridBox *apGridBox,
dataunits::FrameBuffer<float> *apShotCorrelation) override;
void
AfterShotStacking(dataunits::GridBox *apGridBox,
dataunits::FrameBuffer<float> *apStackedShotCorrelation) override;
void
AfterMigration(dataunits::GridBox *apGridBox,
dataunits::FrameBuffer<float> *apStackedShotCorrelation) override;
public:
std::string GetExtension();
public:
float Solve(const float *apMatrix, uint nx, uint nz, uint ny);
private:
uint show_each;
bool write_forward;
bool write_backward;
bool write_reverse;
uint offset;
std::string write_path;
std::ofstream *forward_norm_stream;
std::ofstream *reverse_norm_stream;
std::ofstream *backward_norm_stream;
};
} //namespace callbacks
} //namespace operations
} //namespace operations
#endif // OPERATIONS_LIB_HELPERS_CALLBACKS_NORM_WRITER_H
| 3,630
|
C++
|
.h
| 80
| 32.6625
| 100
| 0.614294
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,402
|
WriterCallback.h
|
brightskiesinc_Reverse_Time_Migration/libs/SeismicOperations/include/operations/helpers/callbacks/concrete/WriterCallback.h
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of SeismicToolbox.
*
* SeismicToolbox is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SeismicToolbox is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPERATIONS_LIB_HELPERS_CALLBACKS_WRITER_CALLBACK_H
#define OPERATIONS_LIB_HELPERS_CALLBACKS_WRITER_CALLBACK_H
#include <string>
#include <vector>
#include <bs/io/api/cpp/BSIO.hpp>
#include <operations/helpers/callbacks/interface/Callback.hpp>
namespace operations {
namespace helpers {
namespace callbacks {
class WriterCallback : public Callback {
public:
WriterCallback(uint aShowEach,
bool aWriteParams,
bool aWriteForward,
bool aWriteBackward,
bool aWriteReverse,
bool aWriteMigration,
bool aWriteReExtendedParams,
bool aWriteSingleShotCorrelation,
bool aWriteEachStackedShot,
bool aWriteTracesRaw,
bool aWriteTracesPreprocessed,
const std::vector<std::string> &aVecParams,
const std::vector<std::string> &aVecReExtendedParams,
const std::string &aWritePath,
std::vector<std::string> &aTypes,
std::vector<std::string> &aUnderlyingConfigurations);
~WriterCallback();
void
WriteResult(uint nx, uint ny, uint ns,
float dx, float dy, float ds,
const float *data, const std::string &filename,
float sample_scale);
void
BeforeInitialization(common::ComputationParameters *apParameters) override;
void
AfterInitialization(dataunits::GridBox *apGridBox) override;
void
BeforeShotPreprocessing(dataunits::TracesHolder *traces) override;
void
AfterShotPreprocessing(dataunits::TracesHolder *traces) override;
void
BeforeForwardPropagation(dataunits::GridBox *apGridBox) override;
void
AfterForwardStep(dataunits::GridBox *box, int time_step) override;
void
BeforeBackwardPropagation(dataunits::GridBox *apGridBox) override;
void
AfterBackwardStep(dataunits::GridBox *apGridBox, int time_step) override;
void
AfterFetchStep(dataunits::GridBox *apGridBox, int time_step) override;
void
BeforeShotStacking(dataunits::GridBox *apGridBox,
dataunits::FrameBuffer<float> *shot_correlation) override;
void
AfterShotStacking(dataunits::GridBox *apGridBox,
dataunits::FrameBuffer<float> *stacked_shot_correlation) override;
void
AfterMigration(dataunits::GridBox *apGridBox,
dataunits::FrameBuffer<float> *stacked_shot_correlation) override;
private:
uint mShowEach;
uint mShotCount;
bool mIsWriteParams;
bool mIsWriteForward;
bool mIsWriteBackward;
bool mIsWriteReverse;
bool mIsWriteMigration;
bool mIsWriteReExtendedParams;
bool mIsWriteSingleShotCorrelation;
bool mIsWriteEachStackedShot;
bool mIsWriteTracesRaw;
bool mIsWriteTracesPreprocessed;
std::string mWritePath;
std::vector<std::string> mParamsVec;
std::vector<std::string> mReExtendedParamsVec;
std::vector<std::string> mWriterTypes;
std::vector<bs::io::streams::SeismicWriter *> mWriters;
};
} //namespace callbacks
} //namespace operations
} //namespace operations
#endif // OPERATIONS_LIB_HELPERS_CALLBACKS_WRITER_CALLBACK_H
| 4,903
|
C++
|
.h
| 101
| 32.90099
| 100
| 0.580004
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,403
|
Callback.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/SeismicOperations/include/operations/helpers/callbacks/interface/Callback.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of SeismicToolbox.
*
* SeismicToolbox is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SeismicToolbox is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPERATIONS_LIB_CALLBACK_HPP
#define OPERATIONS_LIB_CALLBACK_HPP
#include <operations/common/DataTypes.h>
#include <operations/common/ComputationParameters.hpp>
#include <operations/data-units/concrete/holders/GridBox.hpp>
#include <operations/data-units/concrete/holders/TracesHolder.hpp>
namespace operations {
namespace helpers {
namespace callbacks {
class Callback {
public:
virtual void
BeforeInitialization(common::ComputationParameters *apParameters) = 0;
virtual void
AfterInitialization(dataunits::GridBox *apGridBox) = 0;
virtual void
BeforeShotPreprocessing(dataunits::TracesHolder *apTraces) = 0;
virtual void
AfterShotPreprocessing(dataunits::TracesHolder *apTraces) = 0;
virtual void
BeforeForwardPropagation(dataunits::GridBox *apGridBox) = 0;
virtual void
AfterForwardStep(dataunits::GridBox *apGridBox, int time_step) = 0;
virtual void
BeforeBackwardPropagation(dataunits::GridBox *apGridBox) = 0;
virtual void
AfterBackwardStep(dataunits::GridBox *apGridBox, int time_step) = 0;
virtual void
AfterFetchStep(dataunits::GridBox *apGridBox, int time_step) = 0;
virtual void
BeforeShotStacking(dataunits::GridBox *apGridBox, dataunits::FrameBuffer<float> *shot_correlation) = 0;
virtual void
AfterShotStacking(dataunits::GridBox *apGridBox,
dataunits::FrameBuffer<float> *stacked_shot_correlation) = 0;
virtual void
AfterMigration(dataunits::GridBox *apGridBox,
dataunits::FrameBuffer<float> *stacked_shot_correlation) = 0;
};
} //namespace callbacks
} //namespace operations
} //namespace operations
#endif // OPERATIONS_LIB_CALLBACK_HPP
| 2,844
|
C++
|
.h
| 60
| 37.366667
| 119
| 0.661488
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,404
|
Extensions.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/SeismicOperations/include/operations/helpers/callbacks/interface/Extensions.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of SeismicToolbox.
*
* SeismicToolbox is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SeismicToolbox is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPERATIONS_LIB_HELPERS_CALLBACKS_EXTENSIONS_HPP
#define OPERATIONS_LIB_HELPERS_CALLBACKS_EXTENSIONS_HPP
namespace operations {
namespace helpers {
namespace callbacks {
#define OP_K_EXT_SU ".su"
#define OP_K_EXT_SGY ".segy"
#define OP_K_EXT_IMG ".png"
#define OP_K_EXT_BIN ".bin"
#define OP_K_EXT_CSV ".csv"
#define OP_K_EXT_NRM ".tsv"
} //namespace callbacks
} //namespace operations
} //namespace operations
#endif //OPERATIONS_LIB_HELPERS_CALLBACKS_EXTENSIONS_HPP
| 1,347
|
C++
|
.h
| 33
| 38.424242
| 76
| 0.705882
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,405
|
CallbackCollection.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/SeismicOperations/include/operations/helpers/callbacks/primitive/CallbackCollection.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of SeismicToolbox.
*
* SeismicToolbox is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SeismicToolbox is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPERATIONS_LIB_CALLBACK_COLLECTION_HPP
#define OPERATIONS_LIB_CALLBACK_COLLECTION_HPP
#include <vector>
#include <operations/helpers/callbacks/interface/Callback.hpp>
namespace operations {
namespace helpers {
namespace callbacks {
class CallbackCollection {
public:
void
RegisterCallback(Callback *apCallback);
void
BeforeInitialization(common::ComputationParameters *apParameters);
void
AfterInitialization(dataunits::GridBox *apGridBox);
void
BeforeShotPreprocessing(dataunits::TracesHolder *apTraces);
void
AfterShotPreprocessing(dataunits::TracesHolder *apTraces);
void
BeforeForwardPropagation(dataunits::GridBox *apGridBox);
void
AfterForwardStep(dataunits::GridBox *apGridBox, int time_step);
void
BeforeBackwardPropagation(dataunits::GridBox *apGridBox);
void
AfterBackwardStep(dataunits::GridBox *apGridBox, int time_step);
void
AfterFetchStep(dataunits::GridBox *apGridBox, int time_step);
void
BeforeShotStacking(dataunits::GridBox *apGridBox,
dataunits::FrameBuffer<float> *shot_correlation);
void
AfterShotStacking(dataunits::GridBox *apGridBox,
dataunits::FrameBuffer<float> *stacked_shot_correlation);
void
AfterMigration(dataunits::GridBox *apGridBox,
dataunits::FrameBuffer<float> *stacked_shot_correlation);
std::vector<Callback *> &GetCallbacks();
private:
std::vector<Callback *> callbacks;
};
} //namespace callbacks
} //namespace operations
} //namespace operations
#endif // OPERATIONS_LIB_CALLBACK_COLLECTION_HPP
| 2,844
|
C++
|
.h
| 64
| 33.171875
| 91
| 0.635507
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,406
|
NumberHelpers.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/SeismicOperations/tests/test-utils/include/operations/test-utils/NumberHelpers.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of SeismicToolbox.
*
* SeismicToolbox is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SeismicToolbox is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPERATIONS_LIB_TEST_UTILS_NUMBERS_HELPERS_HPP
#define OPERATIONS_LIB_TEST_UTILS_NUMBERS_HELPERS_HPP
#include <cmath>
namespace operations {
namespace testutils {
#define OP_TU_TOLERANCE 0
float calculate_norm(const float *mat, uint nx, uint nz, uint ny);
bool approximately_equal(float a, float b, float tolerance = OP_TU_TOLERANCE);
bool essentially_equal(float a, float b, float tolerance = OP_TU_TOLERANCE);
bool definitely_greater_than(float a, float b, float tolerance = OP_TU_TOLERANCE);
bool definitely_less_than(float a, float b, float tolerance = OP_TU_TOLERANCE);
} //namespace testutils
} //namespace operations
#endif //OPERATIONS_LIB_TEST_UTILS_NUMBERS_HELPERS_HPP
| 1,505
|
C++
|
.h
| 32
| 43.59375
| 90
| 0.75274
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,407
|
EnvironmentHandler.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/SeismicOperations/tests/test-utils/include/operations/test-utils/EnvironmentHandler.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of SeismicToolbox.
*
* SeismicToolbox is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SeismicToolbox is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPERATIONS_LIB_TEST_UTILS_TECHNOLOGY_HANDLER_HPP
#define OPERATIONS_LIB_TEST_UTILS_TECHNOLOGY_HANDLER_HPP
namespace operations {
namespace testutils {
int set_environment();
} //namespace testutils
} //namespace operations
#endif //OPERATIONS_LIB_TEST_UTILS_TECHNOLOGY_HANDLER_HPP
| 1,069
|
C++
|
.h
| 26
| 38.615385
| 76
| 0.770492
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,408
|
TestEnums.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/SeismicOperations/tests/test-utils/include/operations/test-utils/TestEnums.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of SeismicToolbox.
*
* SeismicToolbox is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SeismicToolbox is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPERATIONS_LIB_TEST_UTILS_TEST_ENUMS_HPP
#define OPERATIONS_LIB_TEST_UTILS_TEST_ENUMS_HPP
namespace operations {
namespace testutils {
enum OP_TU_DIMS {
OP_TU_2D, OP_TU_3D
};
enum OP_TU_WIND {
OP_TU_INC_WIND, OP_TU_NO_WIND
};
} //namespace testutils
} //namespace operations
#endif //OPERATIONS_LIB_TEST_UTILS_TEST_ENUMS_HPP
| 1,162
|
C++
|
.h
| 31
| 33.645161
| 76
| 0.725089
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,409
|
DummyDataGenerators.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/SeismicOperations/tests/test-utils/include/operations/test-utils/dummy-data-generators/DummyDataGenerators.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of SeismicToolbox.
*
* SeismicToolbox is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SeismicToolbox is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPERATIONS_LIB_TEST_UTILS_DUMMY_DATA_GENERATORS_HPP
#define OPERATIONS_LIB_TEST_UTILS_DUMMY_DATA_GENERATORS_HPP
#include <operations/test-utils/dummy-data-generators/DummyGridBoxGenerator.hpp>
#include <operations/test-utils/dummy-data-generators/DummyConfigurationMapGenerator.hpp>
#include <operations/test-utils/dummy-data-generators/DummyParametersGenerator.hpp>
#endif //OPERATIONS_LIB_TEST_UTILS_DUMMY_DATA_GENERATORS_HPP
| 1,198
|
C++
|
.h
| 24
| 48.041667
| 89
| 0.797436
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,410
|
DummyParametersGenerator.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/SeismicOperations/tests/test-utils/include/operations/test-utils/dummy-data-generators/DummyParametersGenerator.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of SeismicToolbox.
*
* SeismicToolbox is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SeismicToolbox is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPERATIONS_LIB_TEST_UTILS_COMPUTATION_PARAMETERS_DUMMY_PARAMETERS_GENERATOR_HPP
#define OPERATIONS_LIB_TEST_UTILS_COMPUTATION_PARAMETERS_DUMMY_PARAMETERS_GENERATOR_HPP
#include <operations/common/ComputationParameters.hpp>
#include <operations/common/DataTypes.h>
#include <operations/test-utils/TestEnums.hpp>
namespace operations {
namespace testutils {
common::ComputationParameters *
generate_computation_parameters(
OP_TU_WIND aWindow, APPROXIMATION aApproximation = ISOTROPIC);
common::ComputationParameters *generate_average_case_parameters();
} //namespace testutils
} //namespace operations
#endif //OPERATIONS_LIB_TEST_UTILS_COMPUTATION_PARAMETERS_DUMMY_PARAMETERS_GENERATOR_HPP
| 1,511
|
C++
|
.h
| 32
| 43.9375
| 88
| 0.779742
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,411
|
DummyGridBoxGenerator.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/SeismicOperations/tests/test-utils/include/operations/test-utils/dummy-data-generators/DummyGridBoxGenerator.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of SeismicToolbox.
*
* SeismicToolbox is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SeismicToolbox is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPERATIONS_LIB_TEST_UTILS_DUMMY_DATA_GENERATORS_DUMMY_GRID_BOX_GENERATOR_HPP
#define OPERATIONS_LIB_TEST_UTILS_DUMMY_DATA_GENERATORS_DUMMY_GRID_BOX_GENERATOR_HPP
#include <operations/data-units/concrete/holders/GridBox.hpp>
#include <operations/test-utils/TestEnums.hpp>
namespace operations {
namespace testutils {
dataunits::GridBox *generate_grid_box(OP_TU_DIMS aDims, OP_TU_WIND aWindow);
} //namespace testutils
} //namespace operations
#endif //OPERATIONS_LIB_TEST_UTILS_DUMMY_DATA_GENERATORS_DUMMY_GRID_BOX_GENERATOR_HPP
| 1,317
|
C++
|
.h
| 28
| 44.607143
| 85
| 0.779251
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,412
|
DummyModelGenerator.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/SeismicOperations/tests/test-utils/include/operations/test-utils/dummy-data-generators/DummyModelGenerator.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of SeismicToolbox.
*
* SeismicToolbox is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SeismicToolbox is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPERATIONS_LIB_TEST_UTILS_DUMMY_MODEL_GENERATOR_HPP
#define OPERATIONS_LIB_TEST_UTILS_DUMMY_MODEL_GENERATOR_HPP
#include <string>
namespace operations {
namespace testutils {
/**
* @brief Generates a dummy *.segy file of the following parameters:
*
* Grid Size:-
* nx := 5
* ny := 5
* nz := 5
* nt := 1
*
* Cell Dimensions:-
* dx := 6.25
* dy := 6.25
* dz := 6.25
* dt := 1.0
*
* Model:-
* Name = OPERATIONS_TEST_DATA_PATH "/<model-name>.segy"
* i.e. OPERATIONS_TEST_DATA_PATH is a CMake predefined definition.
* Size = nx * ny * nz;
* Data = All filled with '1's
*/
float *generate_dummy_model(const std::string &aFileName);
} //namespace testutils
} //namespace operations
#endif //OPERATIONS_LIB_TEST_UTILS_COMPUTATION_PARAMETERS_DUMMY_MODEL_GENERATOR_HPP
| 1,736
|
C++
|
.h
| 48
| 30.416667
| 83
| 0.653183
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,413
|
DummyTraceGenerator.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/SeismicOperations/tests/test-utils/include/operations/test-utils/dummy-data-generators/DummyTraceGenerator.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of SeismicToolbox.
*
* SeismicToolbox is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SeismicToolbox is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPERATIONS_LIB_TEST_UTILS_DUMMY_TRACE_GENERATOR_HPP
#define OPERATIONS_LIB_TEST_UTILS_DUMMY_TRACE_GENERATOR_HPP
#include <operations/data-units/concrete/holders/GridBox.hpp>
namespace operations {
namespace testutils {
float *generate_dummy_trace(const std::string &aFileName,
dataunits::GridBox *apGridBox,
int trace_stride_x,
int trace_stride_y);
} //namespace testutils
} //namespace operations
#endif //OPERATIONS_LIB_TEST_UTILS_DUMMY_TRACE_GENERATOR_HPP
| 1,356
|
C++
|
.h
| 30
| 39.266667
| 76
| 0.712661
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,414
|
DummyConfigurationMapGenerator.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/SeismicOperations/tests/test-utils/include/operations/test-utils/dummy-data-generators/DummyConfigurationMapGenerator.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of SeismicToolbox.
*
* SeismicToolbox is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SeismicToolbox is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPERATIONS_LIB_TEST_UTILS_DUMMY_DATA_GENERATORS_DUMMY_CONFIGURATION_MAP_GENERATOR_HPP
#define OPERATIONS_LIB_TEST_UTILS_DUMMY_DATA_GENERATORS_DUMMY_CONFIGURATION_MAP_GENERATOR_HPP
#include <prerequisites/libraries/nlohmann/json.hpp>
#include <bs/base/configurations/concrete/JSONConfigurationMap.hpp>
namespace operations {
namespace testutils {
bs::base::configurations::JSONConfigurationMap *generate_average_case_configuration_map_wave();
} //namespace testutils
} //namespace operations
#endif //OPERATIONS_LIB_TEST_UTILS_DUMMY_DATA_GENERATORS_DUMMY_CONFIGURATION_MAP_GENERATOR_HPP
| 1,376
|
C++
|
.h
| 28
| 46.678571
| 103
| 0.790299
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,415
|
SUWriter.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/BSIO/include/bs/io/streams/concrete/writers/SUWriter.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of BS I/O.
*
* BS I/O is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* BS I/O is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef BS_IO_STREAMS_SU_WRITER_HPP
#define BS_IO_STREAMS_SU_WRITER_HPP
#include <fstream>
#include <bs/io/streams/primitive/Writer.hpp>
#include <bs/io/lookups/SeismicFilesHeaders.hpp>
namespace bs {
namespace io {
namespace streams {
/**
* @brief
*/
class SUWriter : public Writer {
public:
/**
* @brief Constructor.
*/
explicit SUWriter(bs::base::configurations::ConfigurationMap *apConfigurationMap);
/**
* @brief Destructor.
*/
~SUWriter() override;
/**
* @brief
* Acquires the component configurations from a given configurations map.
*
* @param[in] apConfigurationMap
* The configurations map to be used.
*/
void
AcquireConfiguration() override;
/**
* @brief Returns the file format extension of the current stream.
*/
std::string GetExtension() override;
/**
* @brief
* Initializes the writer with the appropriate settings applied
* to the writer, and any preparations needed are done.
* Should be called once at the start.
*
* @param[in] aFilePath
* The path to be used, either directly or as a seed, for writing.
*/
int
Initialize(std::string &aFilePath) override;
/**
* @brief
* Does any final updates needed for consistency of the writer.
* Release all resources and close everything.
* Should be initialized again afterwards to be able to reuse it again.
*/
int
Finalize() override;
/**
* @brief
* Writes a group of gathers to the output stream of the writer.
*
* @param[in] aGathers
* List of gathers to be written.
*
* @return
* An error flag, if 0 that means operation was successful, otherwise indicate an error.
*/
int
Write(std::vector<dataunits::Gather *> aGathers) override;
/**
* @brief
* Writes a gather to the output stream of the writer.
*
* @param[in] aGather
* The gather to be written.
*
* @return
* An error flag, if 0 that means operation was successful, otherwise indicate an error.
*/
int
Write(io::dataunits::Gather *aGather) override;
private:
std::string mFilePath;
std::ofstream mOutputStream;
bool mWriteLittleEndian;
};
} //streams
} //thoth
} //namespace bs
#endif //BS_IO_STREAMS_SU_WRITER_HPP
| 4,007
|
C++
|
.h
| 104
| 25.451923
| 104
| 0.523014
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,416
|
CSVWriter.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/BSIO/include/bs/io/streams/concrete/writers/CSVWriter.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of BS I/O.
*
* BS I/O is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* BS I/O is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef BS_IO_STREAMS_CSV_WRITER_HPP
#define BS_IO_STREAMS_CSV_WRITER_HPP
#include <fstream>
#include <bs/io/streams/primitive/Writer.hpp>
namespace bs {
namespace io {
namespace streams {
/**
* @brief
*/
class CSVWriter : public Writer {
public:
/**
* @brief Constructor.
*/
explicit CSVWriter(bs::base::configurations::ConfigurationMap *apConfigurationMap);
/**
* @brief Destructor.
*/
~CSVWriter() override;
/**
* @brief
* Acquires the component configurations from a given configurations map.
*
* @param[in] apConfigurationMap
* The configurations map to be used.
*/
void
AcquireConfiguration() override;
/**
* @brief Returns the file format extension of the current stream.
*/
std::string GetExtension() override;
/**
* @brief
* Initializes the writer with the appropriate settings applied
* to the writer, and any preparations needed are done.
* Should be called once at the start.
*
* @param[in] aFilePath
* The path to be used, either directly or as a seed, for writing.
*/
int
Initialize(std::string &aFilePath) override;
/**
* @brief
* Does any final updates needed for consistency of the writer.
* Release all resources and close everything.
* Should be initialized again afterwards to be able to reuse it again.
*/
int
Finalize() override;
/**
* @brief
* Writes a group of gathers to the output stream of the writer.
*
* @param[in] aGathers
* List of gathers to be written.
*
* @return
* An error flag, if 0 that means operation was successful, otherwise indicate an error.
*/
int
Write(std::vector<dataunits::Gather *> aGathers) override;
/**
* @brief
* Writes a gather to the output stream of the writer.
*
* @param[in] aGather
* The gather to be written.
*
* @return
* An error flag, if 0 that means operation was successful, otherwise indicate an error.
*/
int
Write(io::dataunits::Gather *aGather) override;
private:
std::string mFilePath;
std::ofstream mOutputStream;
};
} //streams
} //thoth
} //namespace bs
#endif //BS_IO_STREAMS_CSV_WRITER_HPP
| 3,923
|
C++
|
.h
| 102
| 25.303922
| 104
| 0.519569
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,417
|
ImageWriter.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/BSIO/include/bs/io/streams/concrete/writers/ImageWriter.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of BS I/O.
*
* BS I/O is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* BS I/O is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef BS_IO_STREAMS_IMAGE_WRITER_HPP
#define BS_IO_STREAMS_IMAGE_WRITER_HPP
#include <bs/io/streams/primitive/Writer.hpp>
namespace bs {
namespace io {
namespace streams {
/**
* @brief
*/
class ImageWriter : public Writer {
public:
/**
* @brief Constructor
*/
explicit ImageWriter(bs::base::configurations::ConfigurationMap *apConfigurationMap);
/**
* @brief Destructor
*/
~ImageWriter() override = default;
/**
* @brief
* Acquires the component configurations from a given configurations map.
*
* @param[in] apConfigurationMap
* The configurations map to be used.
*/
void
AcquireConfiguration() override;
/**
* @brief Returns the file format extension of the current stream.
*/
std::string
GetExtension() override;
/**
* @brief
* Initializes the writer with the appropriate settings applied
* to the writer, and any preparations needed are done.
* Should be called once at the start.
*
* @param[in] aFilePath
* The path to be used, either directly or as a seed, for writing.
*/
int
Initialize(std::string &aFilePath) override;
/**
* @brief
* Does any final updates needed for consistency of the writer.
* Release all resources and close everything.
* Should be initialized again afterwards to be able to reuse it again.
*/
int
Finalize() override;
/**
* @brief
* Writes a group of gathers to the output stream of the writer.
*
* @param[in] aGathers
* List of gathers to be written.
*
* @return
* An error flag, if 0 that means operation was successful, otherwise indicate an error.
*/
int
Write(std::vector<dataunits::Gather *> aGathers) override;
/**
* @brief
* Writes a gather to the output stream of the writer.
*
* @param[in] aGather
* The gather to be written.
*
* @return
* An error flag, if 0 that means operation was successful, otherwise indicate an error.
*/
int
Write(io::dataunits::Gather *aGather) override;
private:
/**
* @brief
* Normalizes an array using a given percentile.
*
* @param[in] apInputArray
* The array to normalize.
*
* @param[in] aWidth
* The width of the array(number of elements).
*
* @param[in] aHeight
* The height of the array(number of elements).
*
* @param[in] aPercentile
* The percentile to normalize on.
*
* @return
* The normalized array.
*/
static float *NormalizeArrayByPercentile(const float *apInputArray,
int aWidth,
int aHeight,
float aPercentile);
/**
* @brief
* Writes a 2D array as a png image.
*
* @param[in] apArray
* The array to process.
*
* @param[in] aWidth
* The width of the array(minor axis).
*
* @param[in] aHeight
* The height of the array(major axis).
*
* @param[in] aPercentile
* The percentile to normalize on.
*
* @param[in] apFilename
* The filename to write to.
*
* @return
* Status flag.
*/
static int WriteArrayToPNG(const float *apArray,
int aWidth,
int aHeight,
float aPercentile,
const char *apFilename);
/**
* @brief
* Writes a gather to the writer filepath with the added postfix.
*
* @param[in] apGather
* The gather to write.
*
* @param[in] aPostfix
* The postfix tag to add to the name.
*
* @return
* Status flag.
*/
int WriteGather(io::dataunits::Gather *apGather,
const std::string &aPostfix);
private:
/// File path.
std::string mFilePath;
/// The percentile to use.
float mPercentile;
};
} //streams
} //thoth
} //namespace bs
#endif //BS_IO_STREAMS_IMAGE_WRITER_HPP
| 6,608
|
C++
|
.h
| 170
| 22.341176
| 104
| 0.449704
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,418
|
BinaryWriter.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/BSIO/include/bs/io/streams/concrete/writers/BinaryWriter.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of BS I/O.
*
* BS I/O is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* BS I/O is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef BS_IO_STREAMS_BINARY_WRITER_HPP
#define BS_IO_STREAMS_BINARY_WRITER_HPP
#include <fstream>
#include <bs/io/streams/primitive/Writer.hpp>
namespace bs {
namespace io {
namespace streams {
/**
* @brief
*/
class BinaryWriter : public Writer {
public:
/**
* @brief Constructor.
*/
explicit BinaryWriter(bs::base::configurations::ConfigurationMap *apConfigurationMap);
/**
* @brief Destructor.
*/
~BinaryWriter() override;
/**
* @brief
* Acquires the component configurations from a given configurations map.
*
* @param[in] apConfigurationMap
* The configurations map to be used.
*/
void
AcquireConfiguration() override;
/**
* @brief Returns the file format extension of the current stream.
*/
std::string GetExtension() override;
/**
* @brief
* Initializes the writer with the appropriate settings applied
* to the writer, and any preparations needed are done.
* Should be called once at the start.
*
* @param[in] aFilePath
* The path to be used, either directly or as a seed, for writing.
*/
int
Initialize(std::string &aFilePath) override;
/**
* @brief
* Does any final updates needed for consistency of the writer.
* Release all resources and close everything.
* Should be initialized again afterwards to be able to reuse it again.
*/
int
Finalize() override;
/**
* @brief
* Writes a group of gathers to the output stream of the writer.
*
* @param[in] aGathers
* List of gathers to be written.
*
* @return
* An error flag, if 0 that means operation was successful, otherwise indicate an error.
*/
int
Write(std::vector<dataunits::Gather *> aGathers) override;
/**
* @brief
* Writes a gather to the output stream of the writer.
*
* @param[in] aGather
* The gather to be written.
*
* @return
* An error flag, if 0 that means operation was successful, otherwise indicate an error.
*/
int
Write(io::dataunits::Gather *aGather) override;
private:
std::string mFilePath;
std::ofstream mOutputStream;
}; //class BinaryWriter
} //namespace streams
} //namespace io
} //namespace bs
#endif //BS_IO_STREAMS_BINARY_WRITER_HPP
| 3,979
|
C++
|
.h
| 102
| 25.852941
| 104
| 0.524981
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,419
|
SegyWriter.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/BSIO/include/bs/io/streams/concrete/writers/SegyWriter.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of BS I/O.
*
* BS I/O is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* BS I/O is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef BS_IO_STREAMS_SEGY_WRITER_HPP
#define BS_IO_STREAMS_SEGY_WRITER_HPP
#include <bs/io/streams/primitive/Writer.hpp>
#include <bs/io/streams/helpers/OutStreamHelper.hpp>
namespace bs {
namespace io {
namespace streams {
/**
* @brief SEG-Y file format writer.
*/
class SegyWriter : public Writer {
public:
/**
* @brief Constructor
*/
explicit SegyWriter(bs::base::configurations::ConfigurationMap *apConfigurationMap);
/**
* @brief Destructor
*/
~SegyWriter() override;
/**
* @brief
* Acquires the component configurations from a given configurations map.
*
* @param[in] apConfigurationMap
* The configurations map to be used.
*/
void
AcquireConfiguration() override;
/**
* @brief Returns the file format extension of the current stream.
*/
std::string GetExtension() override;
/**
* @brief
* Initializes the writer with the appropriate settings applied
* to the writer, and any preparations needed are done.
* Should be called once at the start.
*
* @param[in] aFilePath
* The path to be used, either directly or as a seed, for writing.
*/
int
Initialize(std::string &aFilePath) override;
/**
* @brief
* Does any final updates needed for consistency of the writer.
* Release all resources and close everything.
* Should be initialized again afterwards to be able to reuse it again.
*/
int
Finalize() override;
/**
* @brief
* Writes a group of gathers to the output stream of the writer.
*
* @param[in] aGathers
* List of gathers to be written.
*
* @return
* An error flag, if 0 that means operation was successful, otherwise indicate an error.
*/
int
Write(std::vector<dataunits::Gather *> aGathers) override;
/**
* @brief
* Writes a gather to the output stream of the writer.
*
* @param[in] aGather
* The gather to be written.
*
* @return
* An error flag, if 0 that means operation was successful, otherwise indicate an error.
*/
int
Write(io::dataunits::Gather *aGather) override;
private:
/// File path.
std::string mFilePath;
/// File stream helper.
streams::helpers::OutStreamHelper *mOutStreamHelpers;
/// Boolean to check whether the target file should be written
/// in little endian or not.
bool mWriteLittleEndian;
/// Check if the binary header is written.
bool mBinaryHeaderWritten;
/// The format to write the floating point data in.
uint16_t mFormat;
};
} //streams
} //thoth
} //namespace bs
#endif //BS_IO_STREAMS_SEGY_WRITER_HPP
| 4,451
|
C++
|
.h
| 111
| 26.63964
| 104
| 0.526
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,420
|
SeismicWriter.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/BSIO/include/bs/io/streams/concrete/writers/SeismicWriter.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of BS I/O.
*
* BS I/O is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* BS I/O is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef BS_IO_STREAMS_SEISMIC_WRITER_HPP
#define BS_IO_STREAMS_SEISMIC_WRITER_HPP
#include <unordered_map>
#include <bs/io/streams/primitive/Writer.hpp>
namespace bs {
namespace io {
namespace streams {
enum class WriterType {
SEGY,
BINARY,
IMAGE,
CSV,
SU,
};
/**
* @brief High-level wrapper for all seismic writers.
*/
class SeismicWriter : public Writer {
public:
/**
* @brief Constructor
*/
explicit SeismicWriter(WriterType aType,
bs::base::configurations::ConfigurationMap *apConfigurationMap);
/**
* @brief Destructor
*/
~SeismicWriter() override;
/**
* @brief
* Convert a string into its equivalent reader type enum.
*
* @param[in] aString
* The string to convert.
*
* @return
* The reader type.
*/
static WriterType
ToWriterType(const std::string &aString);
/**
* @brief
* Convert a writer type to its equivalent string.
*
* @param[in] aType
* The writer type to convert.
*
* @return
* A string representation of the writer type supplied.
*/
static std::string
ToString(WriterType aType);
void
AcquireConfiguration() override;
std::string
GetExtension() override;
int
Initialize(std::string &aFilePath) override;
int
Finalize() override;
int
Write(std::vector<dataunits::Gather *> aGathers) override;
int
Write(io::dataunits::Gather *aGather) override;
private:
/// The writer pointer.
Writer *mpWriter;
/// The static mapping of writer types to strings.
static std::unordered_map<std::string, WriterType> mWriterMap;
};
} //streams
} //thoth
} //namespace bs
#endif //BS_IO_STREAMS_SEISMIC_WRITER_HPP
| 3,304
|
C++
|
.h
| 92
| 23.206522
| 103
| 0.517997
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,421
|
SeismicReader.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/BSIO/include/bs/io/streams/concrete/readers/SeismicReader.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of BS I/O.
*
* BS I/O is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* BS I/O is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef BS_IO_STREAMS_SEISMIC_READER_HPP
#define BS_IO_STREAMS_SEISMIC_READER_HPP
#include <unordered_map>
#include <bs/io/streams/primitive/Reader.hpp>
namespace bs {
namespace io {
namespace streams {
enum class ReaderType {
SEGY,
JSON,
SU,
};
/**
* @brief High-level wrapper for all seismic readers.
*/
class SeismicReader : public Reader {
public:
/**
* @brief Constructor
*/
explicit SeismicReader(
ReaderType aType,
bs::base::configurations::ConfigurationMap *apConfigurationMap);
/**
* @brief
* Convert a string into its equivalent reader type enum.
*
* @param[in] aString
* The string to convert.
*
* @return
* The reader type.
*/
static ReaderType ToReaderType(const std::string &aString);
/**
* @brief
* Convert a reader type to its equivalent string.
*
* @param[in] aType
* The reader type to convert.
*
* @return
* A string representation of the reader type supplied.
*/
static std::string ToString(ReaderType aType);
/**
* @brief Destructor.
*/
~SeismicReader() override;
void AcquireConfiguration() override;
std::string GetExtension() override;
int Initialize(std::vector<std::string> &aGatherKeys,
std::vector<std::pair<std::string, dataunits::Gather::SortDirection>> &aSortingKeys,
std::vector<std::string> &aPaths) override;
int Initialize(std::vector<dataunits::TraceHeaderKey> &aGatherKeys,
std::vector<std::pair<dataunits::TraceHeaderKey, dataunits::Gather::SortDirection>> &aSortingKeys,
std::vector<std::string> &aPaths) override;
int Finalize() override;
void SetHeaderOnlyMode(bool aEnableHeaderOnly) override;
unsigned int GetNumberOfGathers() override;
std::vector<std::vector<std::string>> GetIdentifiers() override;
std::vector<dataunits::Gather *> ReadAll() override;
std::vector<dataunits::Gather *> Read(std::vector<std::vector<std::string>> aHeaderValues) override;
dataunits::Gather *Read(std::vector<std::string> aHeaderValues) override;
dataunits::Gather *Read(unsigned int aIndex) override;
private:
/// The reader pointer.
Reader *mpReader;
/// The static mapping of reader types to strings.
static std::unordered_map<std::string, ReaderType> mReaderMap;
};
}
}
} //namespace bs
#endif //BS_IO_STREAMS_SEISMIC_READER_HPP
| 4,028
|
C++
|
.h
| 93
| 29.924731
| 129
| 0.553425
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,422
|
SUReader.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/BSIO/include/bs/io/streams/concrete/readers/SUReader.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of BS I/O.
*
* BS I/O is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* BS I/O is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef BS_IO_STREAMS_SU_READER_HPP
#define BS_IO_STREAMS_SU_READER_HPP
#include <bs/io/streams/primitive/Reader.hpp>
namespace bs {
namespace io {
namespace streams {
/**
* @brief
*/
class SUReader : public Reader {
public:
/**
* @brief Constructor
*/
explicit SUReader(bs::base::configurations::ConfigurationMap *apConfigurationMap);
/**
* @brief Destructor
*/
~SUReader() override;
};
} //streams
} //thoth
} //namespace bs
#endif //BS_IO_STREAMS_SU_READER_HPP
| 1,434
|
C++
|
.h
| 42
| 27.119048
| 98
| 0.626263
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,541,423
|
SegyReader.hpp
|
brightskiesinc_Reverse_Time_Migration/libs/BSIO/include/bs/io/streams/concrete/readers/SegyReader.hpp
|
/**
* Copyright (C) 2021 by Brightskies inc
*
* This file is part of BS I/O.
*
* BS I/O is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* BS I/O is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef BS_IO_STREAMS_SEGY_READER_HPP
#define BS_IO_STREAMS_SEGY_READER_HPP
#include <bs/io/streams/primitive/Reader.hpp>
#include <bs/io/streams/helpers/InStreamHelper.hpp>
#include <bs/io/indexers/FileIndexer.hpp>
namespace bs {
namespace io {
namespace streams {
/**
* @brief SEG-Y file format reader.
*/
class SegyReader : public Reader {
public:
/**
* @brief Constructor
*/
explicit SegyReader(bs::base::configurations::ConfigurationMap *apConfigurationMap);
/**
* @brief Destructor.
*/
~SegyReader() override;
/**
* @brief
* Acquires the component configurations from a given configurations map.
*
* @param[in] apConfigurationMap
* The configurations map to be used.
*/
void
AcquireConfiguration() override;
/**
* @brief Returns the file format extension of the current stream.
*/
std::string GetExtension() override;
/**
* @brief
* Initializes the reader with the appropriate settings applied
* to the reader, and any preparations needed are done.
* Should be called once at the start.
*
* @param[in] aGatherKeys
* A vector containing the strings of the headers to utilize as the gathers in reading.
* If provided an empty vector, will not gather on any key and will return all data.
*
* @param[in] aSortingKeys
* A vector of pairs with each pair containing a string representing the header to sort on, and the sorting direction.
* The vector is treated with the first element being the most major decider, and the last the most minor one.
* If empty, no sorting is applied.
*
* @param[in] aPaths
* List of paths to be processed by the the reader.
*/
int
Initialize(std::vector<std::string> &aGatherKeys,
std::vector<std::pair<std::string, dataunits::Gather::SortDirection>> &aSortingKeys,
std::vector<std::string> &aPaths) override;
/**
* @brief
* Initializes the reader with the appropriate settings applied
* to the reader, and any preparations needed are done.
* Should be called once at the start.
*
* @param[in] aGatherKeys
* A vector containing the trace header keys of the headers to utilize as the gathers in reading.
* If provided an empty vector, will not gather on any key and will return all data.
*
* @param[in] aSortingKeys
* A vector of pairs with each pair containing a string representing the header to sort on, and the sorting direction.
* The vector is treated with the first element being the most major decider, and the last the most minor one.
* If empty, no sorting is applied.
*
* @param[in] aPaths
* List of paths to be processed by the the reader.
*/
int
Initialize(std::vector<dataunits::TraceHeaderKey> &aGatherKeys,
std::vector<std::pair<dataunits::TraceHeaderKey, dataunits::Gather::SortDirection>> &aSortingKeys,
std::vector<std::string> &aPaths) override;
/**
* @brief
* Release all resources and close everything.
* Should be initialized again afterwards to be able to reuse it again.
*/
int
Finalize() override;
/**
* @brief
* Sets the reader to only read and set the headers in the gather read functionalities.
* This will reduce the time needed, however won't populate the data in the traces at all.
* You should be able to enable and disable as you want during the runs.
* By default, this mode is considered false unless explicitly called and set.
*
* @param[in] aEnableHeaderOnly
* If true, make all gather read functions read and set the headers only.
* If false, will make all gather read functions read headers and data.
*/
void
SetHeaderOnlyMode(bool aEnableHeaderOnly) override;
/**
* @brief
* Return the total number of gathers available for reading.
*
* @return
* An unsigned int representing how many unique gathers are available for the reader.
*/
unsigned int
GetNumberOfGathers() override;
/**
* @brief
* Get the unique values of gathers available to be read.
*
* @return
* A list of sub-lists.
* Each sublist represent one gather unique value combination.
* The sublist length is equal to the number of keys that the reader is set to gather on.
* The list length is equal to the value returned by GetNumberOfGathers().
* The order of values in the sublist matches the same order given in the initialize.
*/
std::vector<std::vector<std::string>>
GetIdentifiers() override;
/**
* @brief
* Get all the gathers that can be read by the reader.
*
* @return
* A vector of all possible gathers.
* The gather pointers returned should be deleted by the user to avoid memory leaks.
*/
std::vector<dataunits::Gather *>
ReadAll() override;
/**
* @brief
* Get a group of gathers with the requested unique values.
*
* @param[in] aHeaderValues
* Each sublist represent one gather unique value combination.
* The sublist length is equal to the number of keys that the reader is set to gather on.
* The order of values in the sublist matches the same order given in the initialize.
*
* @return
* A vector of the gathers matching the given request.
* The gather pointers returned should be deleted by the user to avoid memory leaks.
*/
std::vector<dataunits::Gather *>
Read(std::vector<std::vector<std::string>> aHeaderValues) override;
/**
* @brief
* Get a group of gathers with the requested unique values.
*
* @param[in] aHeaderValues
* Each list represent one gather unique value combination.
* The list length is equal to the number of keys that the reader is set to gather on.
* The order of values in the list matches the same order given in the initialize.
*
* @return
* The gather matching the given request.
* The gather pointer returned should be deleted by the user to avoid memory leaks.
*/
io::dataunits::Gather *
Read(std::vector<std::string> aHeaderValues) override;
/**
* @brief
* Get a gather by its index.
*
* @param[in] aIndex
* The index of the gather to be read. Must be between 0 and
* the number returned by GetNumberOfGathers().
* It should return the gather with the unique value equivalent to
* the entry of GetUniqueGatherValues() at index aIndex.
*
* @return
* The requested gather if possible, nullptr otherwise.
* The gather pointer returned should be deleted by the user to avoid memory leaks.
*/
io::dataunits::Gather *
Read(unsigned int aIndex) override;
/**
* @brief Check if the given SEG-Y file has extended text header or not.
*
* @note This function should not be used before any of the read functions,
* since it gets set internally when parsing the given file.
*/
bool
HasExtendedTextHeader() const;
/**
* @brief Gets the text header extracted from the given SEG-Y file.
*
* @note This function should not be used before any of the read functions,
* since it gets set internally when parsing the given file.
*/
unsigned char *
GetTextHeader();
/**
* @brief Gets the extended text header extracted (i.e. If any) from the given SEG-Y file.
*
* @note This function should not be used before any of the read functions,
* since it gets set internally when parsing the given file.
*/
unsigned char *
GetExtendedTextHeader();
private:
int
Index();
private:
/// File paths.
std::vector<std::string> mPaths;
/// File stream helper.
std::vector<streams::helpers::InStreamHelper *> mInStreamHelpers;
/// Text header.
/// Should be initialized in Initialize function and freed in Finalize function.
unsigned char *mTextHeader;
/// Extended Text header.
/// Should be initialized in Initialize function and freed in Finalize function.
unsigned char *mExtendedHeader;
/// Binary Header Lookup.
lookups::BinaryHeaderLookup mBinaryHeaderLookup{};
/// Files indexers vector.
std::vector<indexers::FileIndexer> mFileIndexers;
/// Index maps vector.
std::vector<indexers::IndexMap> mIndexMaps;
/// Extended Text header check variable.
/// Should be set in any of the Read functions.
bool mHasExtendedTextHeader;
/// Boolean to check whether text headers should be stored or not.
bool mStoreTextHeaders;
/// mGatherKeys: vector of keys to gather on
std::vector<dataunits::TraceHeaderKey> mGatherKeys;
/// mSortingKeys: Keys to sort gathers on, and sorting direction of each key
/// Optional to have file(s) gathers sorted
std::vector<std::pair<dataunits::TraceHeaderKey, dataunits::Gather::SortDirection>> mSortingKeys;
/// Enable header only mode boolean.
bool mEnableHeaderOnly;
};
} //streams
} //thoth
} //namespace bs
#endif //BS_IO_STREAMS_SEGY_READER_HPP
| 12,652
|
C++
|
.h
| 255
| 33.666667
| 134
| 0.539475
|
brightskiesinc/Reverse_Time_Migration
| 36
| 6
| 0
|
LGPL-3.0
|
9/20/2024, 10:45:17 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.