Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
2c3a2a7
set an error when a box has no selection
arng40 Sep 5, 2025
bfe7b49
fix
arng40 Sep 5, 2025
82055c1
string correction viewkeystruct
arng40 Sep 5, 2025
94104fb
revert changement on dataContext
arng40 Sep 5, 2025
c125ae2
Merge remote-tracking branch 'origin/develop' into feat/dudes/error-w…
arng40 Sep 8, 2025
b1fe1a0
test for cuda
arng40 Sep 8, 2025
37bc92d
fix sink selection in test unit test
arng40 Sep 8, 2025
bb3a1ac
fix all test
arng40 Sep 8, 2025
5f84879
doc
arng40 Sep 8, 2025
d93c3d8
uncrustify
arng40 Sep 8, 2025
ed02e2b
trigger integrated
arng40 Sep 8, 2025
1de66c8
add more context & clean log
arng40 Sep 8, 2025
c19069f
syntax
arng40 Sep 9, 2025
59d2d7a
add error to test in integrated test & rebaseline
arng40 Sep 9, 2025
3dca3c4
Merge branch 'develop' into feat/dudes/error-when-box-select-nothing
arng40 Sep 9, 2025
9054c64
wip
arng40 Sep 10, 2025
0fbd101
set a flag from surfaceGenrator to fs
arng40 Sep 10, 2025
7db4040
Merge remote-tracking branch 'origin/develop' into feat/dudes/error-w…
arng40 Sep 10, 2025
5599217
Merge remote-tracking branch 'origin/develop' into feat/dudes/error-w…
arng40 Sep 11, 2025
3d89422
Update thermal leaky well example
dkachuma Sep 16, 2025
82359ae
update the logic set error output
arng40 Sep 19, 2025
f6bd260
Merge branch 'feat/dudes/error-when-box-select-nothing' of https://gi…
arng40 Sep 19, 2025
26fba63
add unit test
arng40 Sep 19, 2025
af62cbc
change map to pair and add MPIComm
arng40 Sep 22, 2025
58e284c
Merge remote-tracking branch 'origin/develop' into feat/dudes/error-w…
arng40 Sep 22, 2025
f09ef8d
xsd
arng40 Sep 22, 2025
5521545
testSet
arng40 Sep 22, 2025
e993c6e
renaming & remove comment
arng40 Sep 22, 2025
3fe65b0
replace integer to string for set error
arng40 Sep 22, 2025
30e85fd
reaname enum errorAsWarning to warning
arng40 Sep 22, 2025
2d8ea45
update fs test
arng40 Sep 23, 2025
e469dfd
add case for SG & update fs wrapper
arng40 Sep 23, 2025
abedcc5
xsd
arng40 Sep 23, 2025
97bc914
doc
arng40 Sep 23, 2025
03f061d
enum loc
arng40 Sep 23, 2025
869ddaf
UPDATE LOGIC
arng40 Sep 23, 2025
d7a3aea
doc
arng40 Sep 23, 2025
4a83b8e
code style
arng40 Sep 24, 2025
02e981e
yaml
arng40 Sep 24, 2025
03d280e
add warning flag for integrated tests failed
arng40 Sep 24, 2025
7433d26
baseline
arng40 Sep 24, 2025
0fe2c58
reduce smoke step & silent for wavePropagation deck
arng40 Sep 25, 2025
1017ecd
move ManagersLoop to MeshObjectPath and renaming variables
arng40 Sep 26, 2025
13b012c
add comment
arng40 Sep 26, 2025
ec86c38
fix space margin
arng40 Sep 29, 2025
8840280
Merge remote-tracking branch 'origin/develop' into feat/dudes/error-w…
arng40 Sep 29, 2025
39675d7
fix capture by ref
arng40 Sep 29, 2025
88d9589
remove setName from capture binding
arng40 Sep 29, 2025
65ed1a0
baseline
arng40 Sep 30, 2025
a28b7c6
Merge remote-tracking branch 'origin/develop' into feat/dudes/error-w…
arng40 Sep 30, 2025
b95f304
fix timeout leakywell
arng40 Sep 30, 2025
3387d4a
revert restart removed
arng40 Oct 7, 2025
308f0e8
Merge remote-tracking branch 'origin/develop' into feat/dudes/error-w…
arng40 Oct 7, 2025
54c013a
news rebaseline
arng40 Oct 7, 2025
4ee688e
Merge remote-tracking branch 'origin/develop' into feat/dudes/error-w…
arng40 Oct 8, 2025
a5f2a43
Merge remote-tracking branch 'origin/develop' into feat/dudes/error-w…
arng40 Oct 9, 2025
874186b
revert thermalLeakyWell
arng40 Oct 10, 2025
2886078
Revert "revert thermalLeakyWell"
arng40 Oct 10, 2025
4b3161a
Merge remote-tracking branch 'origin/develop' into feat/dudes/error-w…
arng40 Oct 10, 2025
562842f
address typo, duplcation & description
arng40 Oct 10, 2025
181e571
Merge remote-tracking branch 'origin/develop' into feat/dudes/error-w…
arng40 Oct 10, 2025
03c20b2
Merge remote-tracking branch 'origin/develop' into feat/dudes/error-w…
arng40 Oct 13, 2025
7c79821
rebaseline
arng40 Oct 13, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/coreComponents/dataRepository/DataContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,12 @@ string DataFileContext::toString() const
}
}

size_t DataFileContext::getLine() const
{
return m_line;
}


DataContext::ToStringInfo DataFileContext::getToStringInfo() const
{ return ToStringInfo( m_targetName, m_filePath, m_line ); }

Expand Down
8 changes: 6 additions & 2 deletions src/coreComponents/dataRepository/DataContext.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ class DataContext
*/
friend std::ostream & operator<<( std::ostream & os, const DataContext & ctx );

/**
* @return the line (starting from 1) where the target object has been declared in the source file.
*/
virtual size_t getLine() const = 0;

protected:
// GroupContext & WrapperContext are friend class to be able to access to the protected method on other instances.
friend class GroupContext;
Expand Down Expand Up @@ -170,8 +175,7 @@ class DataFileContext final : public DataContext
/**
* @return the line (starting from 1) where the target object has been declared in the source file.
*/
size_t getLine() const
{ return m_line; }
size_t getLine() const override;

/**
* @return the character offset in the line (starting from 1) where the target object has been
Expand Down
5 changes: 5 additions & 0 deletions src/coreComponents/dataRepository/GroupContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ string GroupContext::toString() const
DataContext::ToStringInfo GroupContext::getToStringInfo() const
{ return ToStringInfo( m_targetName ); }

size_t GroupContext::getLine() const
{
return m_group.getDataContext().getToStringInfo().m_line;
}


} /* namespace dataRepository */
} /* namespace geos */
5 changes: 5 additions & 0 deletions src/coreComponents/dataRepository/GroupContext.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ class GroupContext : public DataContext
* @copydoc DataContext::getToStringInfo()
*/
ToStringInfo getToStringInfo() const override;

/**
* @copydoc DataContext::getLine()
*/
size_t getLine() const override;
};


Expand Down
5 changes: 5 additions & 0 deletions src/coreComponents/dataRepository/WrapperContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ string WrapperContext::toString() const
GEOS_FMT( "{}/{}", m_group.getDataContext().toString(), m_typeName );
}

size_t WrapperContext::getLine() const
{
return m_group.getDataContext().getToStringInfo().m_line;
}


} /* namespace dataRepository */
} /* namespace geos */
5 changes: 5 additions & 0 deletions src/coreComponents/dataRepository/WrapperContext.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ class WrapperContext final : public GroupContext
*/
string toString() const override;

/**
* @copydoc DataContext::getLine()
*/
size_t getLine() const override;

};


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@ FieldSpecificationBase::FieldSpecificationBase( string const & name, Group * par
setApplyDefaultValue( 1.0e99 ).
setInputFlag( InputFlags::OPTIONAL ).
setDescription( "Time at which the boundary condition will stop being applied." );

registerWrapper( viewKeyStruct::errorAsWarningString(), &m_errorAsWarning ).
setApplyDefaultValue( 1 ).
setInputFlag( InputFlags::OPTIONAL ).
setDescription( "Converts an error into a warning" );
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,8 @@ class FieldSpecificationBase : public dataRepository::Group
constexpr static char const * beginTimeString() { return "beginTime"; }
/// @return The key for endTime
constexpr static char const * endTimeString() { return "endTime"; }
/// @return The key errorAsWarning
constexpr static char const * errorAsWarningString() { return "errorAsWarning"; }
};

/**
Expand Down Expand Up @@ -547,6 +549,11 @@ class FieldSpecificationBase : public dataRepository::Group
return *(m_meshObjectPaths.get());
}

integer getErrorAsWarning() const
{
return m_errorAsWarning;
}


protected:

Expand Down Expand Up @@ -591,6 +598,8 @@ class FieldSpecificationBase : public dataRepository::Group
/// The name of a function used to turn on and off the boundary condition.
string m_bcApplicationFunctionName;

/// Value indicating whether we converts an error into a warning
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

grammar

integer m_errorAsWarning;
};


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,14 +237,38 @@ void FieldSpecificationManager::validateBoundaryConditions( MeshLevel & mesh ) c
GEOS_THROW( setNamesError, InputError );
}

// if a target set is empty, we issue a warning
// ideally we would just stop the simulation, but the SurfaceGenerator relies on this behavior
GeometricObjectManager & geometricObjManager = GeometricObjectManager::getInstance();

for( auto const & mapEntry : isTargetSetEmpty )
{
GEOS_LOG_RANK_0_IF( ( mapEntry.second == 1 ), // target set is empty
GEOS_FMT( "\nWarning!\n{}: this FieldSpecification targets (an) empty set(s)"
"\nIf the simulation does not involve the SurfaceGenerator, check the content of the set `{}` in `{}`. \n",
fs.getDataContext(), mapEntry.first, fs.getObjectPath() ) );
if( mapEntry.second == 1 )
{
geometricObjManager.forSubGroups< SimpleGeometricObjectBase >(
[&]( SimpleGeometricObjectBase const & object )
{
if( mapEntry.first == object.getName())
{
std::ostringstream message;
message << GEOS_FMT( "{}: this FieldSpecification targets (an) empty set(s)\n"
"The box {} does not select any region.\n"
"If the simulation does not involve the SurfaceGenerator, check the content of the set `{}` in `{}`.\n",
fs.getDataContext(), object.getDataContext(),
mapEntry.first, fs.getObjectPath());
if( fs.getErrorAsWarning() )
{
std::stringstream line;
line << fs.getDataContext().getLine();
message << GEOS_FMT( "You can set `errorAsWarning` (l. {}) to `0` to disable the error.",
line.str() );
GEOS_ERROR( message.str() );
}
else
{
GEOS_WARNING( message.str() );
}
}
} );
}
}

if( isFieldNameFound == 0 )
Expand Down
Loading